[patch-2.3.40-pre6] kzalloc() (ala kmem_zalloc() of SVR4)
Jeff Garzik
jgarzik en mandrakesoft.com
Sab Ene 22 12:10:25 CST 2000
Tigran Aivazian wrote:
>
> Hi Linus,
>
> a common code sequence of calling kmalloc() and then memset(p,0,size) can
> be optimized into a single exported interface called kzalloc() like it is
> done on other systems (kmem_zalloc()). This is a simple and harmless
> optimization - please consider it:
>
> http://www.ocston.org/~tigran/patches/kzalloc-2.3.40-p6.patch
>
> I only converted a couple of places (including BFS) to use kzallo() -
> there is surely plenty more cases that can be improved.
I proposed something along these lines several months ago, poke around
for the thread. While I agree with the patch, because it will save me a
few lines of code here and there, an idea that came out of the previous
discussion is also worth considering -- zeroing pages during system idle
time, and then handing those out from kzalloc() (or
kmalloc(GFP_ZERO|GFP_xxx) or whatever)
--
Jeff Garzik | Andre the Giant has a posse.
Building 1024 |
MandrakeSoft, Inc. |
-
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