lkml.org 
[lkml]   [2011]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] sparc64: Kill page table quicklists.
On Tue, 12 Jul 2011 14:26:09 +0200
Peter Zijlstra <a.p.zijlstra@chello.nl> 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();
> + }
> +


\
 
 \ /
  Last update: 2011-07-14 00:35    [W:0.071 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site