[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090918093531.3c3cd6c0@jbarnes-g45>
Date: Fri, 18 Sep 2009 09:35:31 -0700
From: Jesse Barnes <jbarnes@...tuousgeek.org>
To: Yinghai Lu <yinghai@...nel.org>
Cc: David Rientjes <rientjes@...gle.com>,
Suresh Jayaram <sureshjayaram@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Jesse Brandeburg <jesse.brandeburg@...il.com>
Subject: Re: mmotm 2009-09-09-22-56 uploaded
On Fri, 18 Sep 2009 09:27:33 -0700
Yinghai Lu <yinghai@...nel.org> wrote:
> 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@...gle.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...
There is no nearby node. That's why node is -1.
--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists