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

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Jan 21 2000 - 14:08:05 EST


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@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:26 EST