[patch-2.3.40-pre6] kzalloc() (ala kmem_zalloc() of SVR4)

Jamie Lokier lkd en tantalophile.demon.co.uk
Dom Ene 23 20:38:30 CST 2000


Horst von Brand wrote:
> > zeroing pages during system idle
> > time, and then handing those out from kzalloc() (or
> > kmalloc(GFP_ZERO|GFP_xxx) or whatever)
> 
> What pages would you clear? Linux uses every bit of memory it gets its
> hands on, and pages that are written out stay around in case their contents
> are needed later. So I see very little oportunity for scavenging pages for
> zeroing (perhaps just stuff that went to closed/unmounted filesystems).

You'd do it anyway at the expense of other pages, if it improves
performance...  The reason it might improve performance is that you do
the zero-fill in otherwise idle time.  So you get getter overlap with
I/O.  In theory.

And on a multiprocessor system one idle processor can zero pages while
the other is consuming them.

For similar reasons it might be worth pre-copying COW pages.  I don't
know if that's at all plausible.  It's a pretty similar thing to
pre-emptive swap-in.

Perhaps you'd do the freepages.min pages -- pre-zeroed pages are quickly
reclaimable after all.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda