On Tue, 12 Jul 2011 14:26:09 +0200 Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote: > --- linux-2.6.orig/arch/sparc/mm/tsb.c > +++ linux-2.6/arch/sparc/mm/tsb.c > @@ -236,6 +236,8 @@ static void setup_tsb_params(struct mm_s > } > } > > +struct kmem_cache *pgtable_cache __read_mostly; > + > static struct kmem_cache *tsb_caches[8] __read_mostly; > > static const char *tsb_cache_names[8] = { > @@ -253,6 +255,15 @@ void __init pgtable_cache_init(void) > { > unsigned long i; > > + pgtable_cache = kmem_cache_create("pgtable_cache", > + PAGE_SIZE, PAGE_SIZE, > + 0, > + _clear_page); The use of slab constructors is often dubious from a cache usage POV. But the lifecycle of a page-table page might well be that it slowly gets non-zeroes written into it and then slowly gets zeroes written into it until it is all-zeroes and then we free it up. And often only a subset of the page will ever be written. So it could be that the slab constructor behaviour is a good match here. And not just for sparc! Did such thinking and/or any testing go into this decision? > + if (!pgtable_cache) { > + prom_printf("pgtable_cache_init(): Could not create!\n"); > + prom_halt(); > + } > + -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>