linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"mel@csn.ul.ie" <mel@csn.ul.ie>,
	"Zhao, Yakui" <yakui.zhao@intel.com>
Subject: Re: + memory-hotplug-update-zone-pcp-at-memory-online.patch added to -mm tree
Date: Tue, 30 Jun 2009 08:58:28 +0800	[thread overview]
Message-ID: <20090630005828.GC21254@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0906291814150.21956@gentwo.org>

On Tue, Jun 30, 2009 at 06:17:52AM +0800, Christoph Lameter wrote:
> On Mon, 29 Jun 2009, akpm@linux-foundation.org wrote:
> 
> > In my test, 128M memory is hot added, but zone's pcp batch is 0, which is
> > an obvious error.  When pages are onlined, zone pcp should be updated
> > accordingly.
> 
> Another side effect of the checks for unpopulated zones....?
Even for populated zones, the pcp should be updated as its value might not
be good as more memory is added.

> > diff -puN mm/page_alloc.c~memory-hotplug-update-zone-pcp-at-memory-online mm/page_alloc.c
> > --- a/mm/page_alloc.c~memory-hotplug-update-zone-pcp-at-memory-online
> > +++ a/mm/page_alloc.c
> > @@ -3135,6 +3135,31 @@ int zone_wait_table_init(struct zone *zo
> >  	return 0;
> >  }
> >
> > +static int __zone_pcp_update(void *data)
> > +{
> > +	struct zone *zone = data;
> > +	int cpu;
> > +	unsigned long batch = zone_batchsize(zone), flags;
> > +
> > +	for (cpu = 0; cpu < NR_CPUS; cpu++) {
> 
> foreach possible cpu?
Just follows zone_pcp_init(), do you think we should change that too?

> > +		struct per_cpu_pageset *pset;
> > +		struct per_cpu_pages *pcp;
> > +
> > +		pset = zone_pcp(zone, cpu);
> > +		pcp = &pset->pcp;
> > +
> > +		local_irq_save(flags);
> > +		free_pages_bulk(zone, pcp->count, &pcp->list, 0);
> 
> There are no pages in the pageset since the pcp batch is zero right?
It might not be zero for a populated zone, see above comments.

Thanks,
Shaohua

--
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-30  0:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200906291949.n5TJno8X028680@imap1.linux-foundation.org>
     [not found] ` <alpine.DEB.1.10.0906291814150.21956@gentwo.org>
2009-06-30  0:58   ` Shaohua Li [this message]
2009-06-30 14:21     ` Christoph Lameter
2009-07-01  1:46       ` Shaohua Li

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=20090630005828.GC21254@sli10-desk.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=yakui.zhao@intel.com \
    /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