lkml.org 
[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] General purpose zeroed page slab
Martin K. Petersen wrote:
> A while back Bill Irwin converted the page table code on ppc64 to use
> a zeroed page slab. I recently did the same on ia64 and got a
> significant performance improvement in terms of fault time (4 usec ->
> 700 nsec).
>
> This cache needs to be initialized fairly early on and so far we've
> called it from pgtable_cache_init() on both archs. However, Tony Luck
> thought it might be useful to have a general purpose slab cache with
> zeroed pages. And other architectures might decide to use it for
> their page tables too.
>
> Consequently here's a patch that puts this functionality in slab.c.
>
> Signed-off-by: Martin K. Petersen <mkp@wildopensource.com>
>

This doesn't work as you expect it does. The constructor is only called
when a new slab is created, for each new object on the slab. It is
_not_ run again when an object is freed. So if a page is freed then
immediately reallocated it will contain garbage.

--
Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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