Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-03 Thread Peter Zijlstra
On Tue, Sep 03, 2019 at 12:15:24PM +, Salil Mehta wrote: > > From: Linuxarm [mailto:linuxarm-boun...@huawei.com] On Behalf Of Peter > > Zijlstra > > On Tue, Sep 03, 2019 at 02:19:04PM +0800, Yunsheng Lin wrote: > > > Is it possible that the node id set by device_add() become invalid > > > if

RE: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-03 Thread Salil Mehta
> From: Linuxarm [mailto:linuxarm-boun...@huawei.com] On Behalf Of Peter > Zijlstra > Sent: Tuesday, September 3, 2019 8:11 AM > > On Tue, Sep 03, 2019 at 02:19:04PM +0800, Yunsheng Lin wrote: > > On 2019/9/2 20:56, Peter Zijlstra wrote: > > > On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Li

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-03 Thread Yunsheng Lin
On 2019/9/3 15:11, Peter Zijlstra wrote: > On Tue, Sep 03, 2019 at 02:19:04PM +0800, Yunsheng Lin wrote: >> On 2019/9/2 20:56, Peter Zijlstra wrote: >>> On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: On 2019/9/2 15:25, Peter Zijlstra wrote: > On Mon, Sep 02, 2019 at 01:46:51

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-03 Thread Peter Zijlstra
On Tue, Sep 03, 2019 at 02:19:04PM +0800, Yunsheng Lin wrote: > On 2019/9/2 20:56, Peter Zijlstra wrote: > > On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: > >> On 2019/9/2 15:25, Peter Zijlstra wrote: > >>> On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > On 2019

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Yunsheng Lin
On 2019/9/2 20:56, Peter Zijlstra wrote: > On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: >> On 2019/9/2 15:25, Peter Zijlstra wrote: >>> On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: On 2019/9/1 0:12, Peter Zijlstra wrote: >>> > 1) because even it is not set

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 08:22:52PM +0200, Ingo Molnar wrote: > > * Peter Zijlstra 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(st

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: > > On 2019/9/2 15:25, Peter Zijlstra wrote: > > > On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > > >> On 2019/9/1 0:12, Peter Zijlstra wrote: > > > > > >>> 1) because even it is not set, t

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Ingo Molnar
* Peter Zijlstra wrote: > Also note that the CONFIG_DEBUG_PER_CPU_MAPS version of > cpumask_of_node() already does this (although it wants the below fix). > > --- > diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c > index e6dad600614c..5f49c10201c7 100644 > --- a/arch/x86/mm/numa.c > +++ b

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: > On 2019/9/2 15:25, Peter Zijlstra wrote: > > On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > >> On 2019/9/1 0:12, Peter Zijlstra wrote: > > > >>> 1) because even it is not set, the device really does belong to a node.

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Yunsheng Lin
On 2019/9/2 15:25, Peter Zijlstra wrote: > On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: >> On 2019/9/1 0:12, Peter Zijlstra wrote: > >>> 1) because even it is not set, the device really does belong to a node. >>> It is impossible a device will have magic uniform access to memory w

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > On 2019/9/1 0:12, Peter Zijlstra wrote: > > 1) because even it is not set, the device really does belong to a node. > > It is impossible a device will have magic uniform access to memory when > > CPUs cannot. > > So it means dev_to_n

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-09-01 Thread Yunsheng Lin
On 2019/9/1 0:12, Peter Zijlstra wrote: > On Sat, Aug 31, 2019 at 06:09:39PM +0800, Yunsheng Lin wrote: >> >> >> On 2019/8/31 16:55, Peter Zijlstra wrote: >>> On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of p

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Peter Zijlstra
On Sat, Aug 31, 2019 at 06:09:39PM +0800, Yunsheng Lin wrote: > > > On 2019/8/31 16:55, Peter Zijlstra wrote: > > On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: > >> According to Section 6.2.14 from ACPI spec 6.3 [1], the setting > >> of proximity domain is optional, as below: > >>

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Yunsheng Lin
On 2019/8/31 16:55, Peter Zijlstra wrote: > On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: >> According to Section 6.2.14 from ACPI spec 6.3 [1], the setting >> of proximity domain is optional, as below: >> >> This optional object is used to describe proximity domain >> associatio

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Peter Zijlstra
On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: > According to Section 6.2.14 from ACPI spec 6.3 [1], the setting > of proximity domain is optional, as below: > > This optional object is used to describe proximity domain > associations within a machine. _PXM evaluates to an integer >

[PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in th