linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH 1/4] sparc64: Kill page table quicklists.
Date: Wed, 13 Jul 2011 15:31:52 -0700	[thread overview]
Message-ID: <20110713153152.269b893c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110712122911.555480541@chello.nl>

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();
> +	}
> +

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  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@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-07-13 22:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 12:26 [PATCH 0/4] mm, sparc64: Implement gup_fast() Peter Zijlstra
2011-07-12 12:26 ` [PATCH 1/4] sparc64: Kill page table quicklists Peter Zijlstra
2011-07-13 22:31   ` Andrew Morton [this message]
2011-07-12 12:26 ` [PATCH 2/4] sparc64: Use RCU page table freeing Peter Zijlstra
2011-07-12 12:26 ` [PATCH 3/4] sparc64: Add support for _PAGE_SPECIAL Peter Zijlstra
2011-07-12 12:26 ` [PATCH 4/4] sparc64: Implement get_user_pages_fast() Peter Zijlstra
2011-07-12 12:42 ` [PATCH 0/4] mm, sparc64: Implement gup_fast() Peter Zijlstra
2011-07-13 22:33   ` Andrew Morton
2011-07-15 16:21     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110713153152.269b893c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).