linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dimitri Sivanich <sivanich@sgi.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: cl@linux-foundation.org, mel@csn.ul.ie, nickpiggin@yahoo.com.au,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org
Subject: Re: + page_alloc-oops-when-setting-percpu_pagelist_fraction.patch added to -mm tree
Date: Wed, 17 Jun 2009 09:00:53 -0500	[thread overview]
Message-ID: <20090617140053.GB32637@sgi.com> (raw)
In-Reply-To: <20090617091040.99BB.A69D9226@jp.fujitsu.com>

On Wed, Jun 17, 2009 at 09:21:27AM +0900, KOSAKI Motohiro wrote:
> (switch to lkml)
> 
> Sorry for late review.
> 
> >  mm/page_alloc.c |    6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff -puN mm/page_alloc.c~page_alloc-oops-when-setting-percpu_pagelist_fraction mm/page_alloc.c
> > --- a/mm/page_alloc.c~page_alloc-oops-when-setting-percpu_pagelist_fraction
> > +++ a/mm/page_alloc.c
> > @@ -2806,7 +2806,11 @@ static int __cpuinit process_zones(int c
> >  
> >  	node_set_state(node, N_CPU);	/* this node has a cpu */
> >  
> > -	for_each_populated_zone(zone) {
> > +	for_each_zone(zone) {
> > +		if (!populated_zone(zone)) {
> > +			zone_pcp(zone, cpu) = &boot_pageset[cpu];
> > +			continue;
> > +		}
> >  		zone_pcp(zone, cpu) = kmalloc_node(sizeof(struct per_cpu_pageset),
> >  					 GFP_KERNEL, node);
> >  		if (!zone_pcp(zone, cpu))
> 
> I don't think this code works.
> pcp is only protected local_irq_save(), not spin lock. it assume
> each cpu have different own pcp. but this patch break this assumption.
> Now, we can share boot_pageset by multiple cpus.
> 

I'm not quite understanding what you mean.

Prior to the cpu going down, each unpopulated zone pointed to the boot_pageset (per_cpu_pageset) for it's cpu (it's array element), so things had been set up this way already.  I could be missing something, but am not sure why restoring this would be a risk?

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-06-17 14:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200906161901.n5GJ1osY026940@imap1.linux-foundation.org>
2009-06-17  0:21 ` KOSAKI Motohiro
2009-06-17 14:00   ` Dimitri Sivanich [this message]
2009-06-17 17:34     ` Christoph Lameter

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=20090617140053.GB32637@sgi.com \
    --to=sivanich@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=nickpiggin@yahoo.com.au \
    /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