mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Andrew Morton <akpm@linux-foundation.org>,
	minskey guo <chaohong_guo@linux.intel.com>,
	linux-mm@kvack.org, prarit@redhat.com, andi.kleen@intel.com,
	linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	stable@kernel.org
Subject: Re: [PATCH] online CPU before memory failed in pcpu_alloc_pages()
Date: Fri, 21 May 2010 08:32:09 -0400	[thread overview]
Message-ID: <1274445129.9131.9.camel@useless.americas.hpqcorp.net> (raw)
In-Reply-To: <20100521134424.45e0ee36.kamezawa.hiroyu@jp.fujitsu.com>

On Fri, 2010-05-21 at 13:44 +0900, KAMEZAWA Hiroyuki wrote:
> On Fri, 21 May 2010 10:55:12 +1000
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Andrew,
> > 
> > On Thu, 20 May 2010 13:43:59 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > > --- a/mm/percpu.c
> > > > +++ b/mm/percpu.c
> > > > @@ -714,13 +714,29 @@ static int pcpu_alloc_pages(struct pcpu_chunk *chunk,
> > > 
> > > In linux-next, Tejun has gone and moved pcpu_alloc_pages() into the new
> > > mm/percpu-vm.c.  So either
> > 
> > This has gone into Linus' tree today ...
> > 
> 
> Hmm, a comment here.
> 
> Recently, Lee Schermerhorn developed
> 
>  numa-introduce-numa_mem_id-effective-local-memory-node-id-fix2.patch
> 
> Then, you can use cpu_to_mem() instead of cpu_to_node() to find the
> nearest available node.
> I don't check cpu_to_mem() is synchronized with NUMA hotplug but
> using cpu_to_mem() rather than adding 
> =
> 
> +			if ((nid == -1) ||
> +			    !(node_zonelist(nid, GFP_KERNEL)->_zonerefs->zone))
> +				nid = numa_node_id();
> +
> ==
> 
> is better. 


Kame-san, all:

numa_mem_id() and cpu_to_mem() are not supported [yet] on x86 because
x86 hides all memoryless nodes and moves cpus to "nearby" [for some
definition thereof] nodes with memory.  So, these interfaces just return
numa_node_id() and cpu_to_node() for x86.  Perhaps that will change
someday...

Lee


> 
> Thanks,
> -Kame
> 
> --
> 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>


  parent reply	other threads:[~2010-05-21 12:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18  6:17 minskey guo
2010-05-20 20:43 ` Andrew Morton
2010-05-21  0:55   ` Stephen Rothwell
2010-05-21  4:44     ` KAMEZAWA Hiroyuki
2010-05-21  8:22       ` minskey guo
2010-05-21  8:39         ` KAMEZAWA Hiroyuki
2010-05-21  9:12           ` minskey guo
2010-05-21 13:21             ` Lee Schermerhorn
2010-05-24  1:03               ` Guo, Chaohong
2010-05-24 14:59                 ` Lee Schermerhorn
2010-05-25  1:35                   ` Guo, Chaohong
2010-05-21 12:32       ` Lee Schermerhorn [this message]
2010-05-21  4:05   ` Guo, Chaohong
2010-05-21  7:29   ` Kleen, Andi

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=1274445129.9131.9.camel@useless.americas.hpqcorp.net \
    --to=lee.schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.kleen@intel.com \
    --cc=chaohong_guo@linux.intel.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=prarit@redhat.com \
    --cc=sfr@canb.auug.org.au \
    --cc=stable@kernel.org \
    --cc=tj@kernel.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

all inboxes | Powered by JetHome®