lkml.org 
[lkml]   [1999]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH 2.3.26: kmalloc GFP_ZERO
Andrea Arcangeli wrote:
>
> On Tue, 9 Nov 1999 yodaiken@chelm.cs.nmt.edu wrote:
>
> >> Are you still talking about a cache of zeroed pages? Looks a bad idea to
> >> me.
> >
> >The numbers say otherwise.
>
> So you are benchmarking a machine that spend time in the idle task.
>
> If you benchmarked a kernel compile make sure to compile with:
>
> make MAKE='make -j4' -j4 bzImage
>
> Then the numbers will agree with me (if you won't hit swap). Also make
> sure to apply my SMP scheduler patch in the aa patches.
>
> >The idle task will build a cache of zeroed pages. If nothing is in the
> >cache, you pay the standard cost.
>
> You'll also pay the check to see if the pool is empty before doing the
> memset by hand. You'll take the slow path in the case worth to optimize.

If you add "kcalloc" instead of hacking "kmalloc" as I did, drivers
wanting zeroed pages make the conscious decision of calling another
function, with a potentially slower path.

Such a split would also make it easier to enumerate
architecture-dependent paths. For some architectures may choose the
default -- kmalloc+memset -- and other archs can choose a page-zeroing
idle task, all without affecting kmalloc/kmem_cache_alloc

--
Jeff Garzik | Just once, I wish we would encounter
Building 1024 | an alien menace that wasn't immune to
MandrakeSoft, Inc. | bullets. -- The Brigadier, "Dr. Who"

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.060 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site