public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Suresh Jayaram <sureshjayaram@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Jesse Brandeburg <jesse.brandeburg@gmail.com>
Subject: Re: mmotm 2009-09-09-22-56 uploaded
Date: Fri, 18 Sep 2009 09:27:33 -0700	[thread overview]
Message-ID: <4AB3B4F5.6080809@kernel.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0909180339200.6267@chino.kir.corp.google.com>

David Rientjes wrote:
> On Fri, 18 Sep 2009, David Rientjes wrote:
> 
>> This seems to be related to 2547089 "x86/PCI: initialize PCI bus node 
>> numbers early" since cpumask_of_pcibus() on x86 doesn't check for -1 
>> pcibus_to_node() like most other architectures.  It'll simply index into 
>> cpumask_of_node for whatever the pci_sysdata's node is, and in this case 
>> that's -1.
>>
> 
> Suresh, could you give this patch a try?  It turns out that the 
> mp_bus_to_node map simply leaves all busses that don't have memory 
> affinity to -1, so cpu_online_mask is actually the appropriate cpumask to 
> return and x86 doesn't catch this.
> 
> 
> x86: default pcibus cpumask to all cpus if it lacks affinity
> 
> The early initialization of the pci bus to node mapping leaves all busses
> with a node id of -1 if it lacks memory affinity.  Thus, cpumask_of_pcibus
> must return all online cpus for such busses.
> 
> Signed-off-by: David Rientjes <rientjes@google.com>
> ---
>  arch/x86/include/asm/pci.h |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
> --- a/arch/x86/include/asm/pci.h
> +++ b/arch/x86/include/asm/pci.h
> @@ -143,7 +143,11 @@ static inline int __pcibus_to_node(const struct pci_bus *bus)
>  static inline const struct cpumask *
>  cpumask_of_pcibus(const struct pci_bus *bus)
>  {
> -	return cpumask_of_node(__pcibus_to_node(bus));
> +	int node;
> +
> +	node = __pcibus_to_node(bus);
> +	return (node == -1) ? cpu_online_mask :
> +			      cpumask_of_node(node);
>  }
>  #endif
>  

looks right, but we should use nearby_node or local cpu node instead of cpu_online_mask...

YH

  parent reply	other threads:[~2009-09-18 16:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10  6:01 mmotm 2009-09-09-22-56 uploaded akpm
2009-09-14  6:02 ` Suresh Jayaram
2009-09-14  7:10   ` Andrew Morton
2009-09-15  4:59   ` David Rientjes
2009-09-15  6:34     ` Dmitry Torokhov
2009-09-15  6:49       ` David Rientjes
2009-09-15 10:20     ` Suresh Jayaram
2009-09-15 22:39       ` David Rientjes
2009-09-18  9:38         ` David Rientjes
2009-09-18  9:38         ` Suresh Jayaram
2009-09-18  9:52           ` David Rientjes
2009-09-18 10:41             ` David Rientjes
2009-09-18 15:26               ` Jesse Barnes
2009-09-18 16:23               ` Suresh Jayaram
2009-09-18 16:27               ` Yinghai Lu [this message]
2009-09-18 16:35                 ` Jesse Barnes
     [not found]     ` <38c3c4860909150313k6ca79371y91b68db3294e08f6@mail.gmail.com>
2009-09-15 18:27       ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2009-09-29  6:19 Suresh Jayaraman
2009-09-29  6:27 ` Andrew Morton
2009-09-29  6:32   ` KAMEZAWA Hiroyuki
2009-09-29 11:13   ` Suresh Jayaraman
2009-09-29  6:30 ` KAMEZAWA Hiroyuki

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=4AB3B4F5.6080809@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jesse.brandeburg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mm-commits@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=sureshjayaram@gmail.com \
    --cc=tglx@linutronix.de \
    /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