[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190902191421.GT2369@hirez.programming.kicks-ass.net>
Date: Mon, 2 Sep 2019 21:14:21 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Yunsheng Lin <linyunsheng@...wei.com>, dalias@...c.org,
linux-sh@...r.kernel.org, catalin.marinas@....com,
dave.hansen@...ux.intel.com, heiko.carstens@...ibm.com,
linuxarm@...wei.com, jiaxun.yang@...goat.com,
linux-kernel@...r.kernel.org, mwb@...ux.vnet.ibm.com,
paulus@...ba.org, hpa@...or.com, sparclinux@...r.kernel.org,
chenhc@...ote.com, will@...nel.org, linux-s390@...r.kernel.org,
ysato@...rs.sourceforge.jp, mpe@...erman.id.au, x86@...nel.org,
rppt@...ux.ibm.com, borntraeger@...ibm.com, dledford@...hat.com,
mingo@...hat.com, jeffrey.t.kirsher@...el.com,
benh@...nel.crashing.org, jhogan@...nel.org,
nfont@...ux.vnet.ibm.com, mattst88@...il.com, len.brown@...el.com,
gor@...ux.ibm.com, anshuman.khandual@....com,
ink@...assic.park.msu.ru, cai@....pw, luto@...nel.org,
tglx@...utronix.de, naveen.n.rao@...ux.vnet.ibm.com,
linux-arm-kernel@...ts.infradead.org, rth@...ddle.net,
axboe@...nel.dk, robin.murphy@....com, linux-mips@...r.kernel.org,
ralf@...ux-mips.org, tbogendoerfer@...e.de, paul.burton@...s.com,
linux-alpha@...r.kernel.org, bp@...en8.de,
akpm@...ux-foundation.org, linuxppc-dev@...ts.ozlabs.org,
davem@...emloft.net,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>
Subject: Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86
On Mon, Sep 02, 2019 at 08:22:52PM +0200, Ingo Molnar wrote:
>
> * Peter Zijlstra <peterz@...radead.org> wrote:
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index f0dd8e38fee3..2caf204966a0 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -2120,8 +2120,16 @@ int device_add(struct device *dev)
> > dev->kobj.parent = kobj;
> >
> > /* use parent numa_node */
> > - if (parent && (dev_to_node(dev) == NUMA_NO_NODE))
> > - set_dev_node(dev, dev_to_node(parent));
> > + if (dev_to_node(dev) == NUMA_NO_NODE) {
> > + if (parent)
> > + set_dev_node(dev, dev_to_node(parent));
> > +#ifdef CONFIG_NUMA
> > + else {
> > + pr_err("device: '%s': has no assigned NUMA node\n", dev_name(dev));
> > + set_dev_node(dev, 0);
> > + }
> > +#endif
>
> BTW., is firmware required to always provide a NUMA node on NUMA systems?
>
> I.e. do we really want this warning on non-NUMA systems that don't assign
> NUMA nodes?
Good point; we might have to exclude nr_node_ids==1 systems from
warning.
> Also, even on NUMA systems, is firmware required to provide a NUMA node -
> i.e. is it in principle invalid to offer no NUMA binding?
I think so; a device needs to be _somewhere_, right? Typically though;
devices are on a PCI bus, and the PCI bridge itself will have a NUMA
binding and then the above parent rule will make everything just work.
But I don't see how you can be outside of the NUMA topology.
Powered by blists - more mailing lists