[PATCH v10 4/7] x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid.

2016-07-26 Thread Dou Liyang
at caller is able to control if disabled processors are ignored. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.

[PATCH v10 5/7] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-07-26 Thread Dou Liyang
jitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/ia64/kernel/acpi.c | 3 +- arch/x86/kernel/acpi/boot.c | 4 ++- drivers/acpi/acpi_processor.c | 5 drivers/acpi

[PATCH v10 6/7] acpi: Provide the mechanism to validate processors in the ACPI tables

2016-07-26 Thread Dou Liyang
as being unreasonable; The function will record the unique or duplicate processor IDs. The duplicate processor IDs such as 89 are regarded as the unreasonable IDs which mean that the processor objects in question are not valid. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- dri

[PATCH v10 7/7] acpi: Provide the interface to validate the proc_id

2016-07-26 Thread Dou Liyang
. When we establish all possible cpuid <-> nodeid mapping to handle the cpu hotplugs, we will use the proc_id from ACPI table. We do validation when we get the proc_id. If the result is true, we will stop the mapping. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi

[PATCH v10 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-07-26 Thread Dou Liyang
ished step 1. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 26 +

[PATCH v10 0/7] Make cpuid <-> nodeid mapping persistent

2016-07-26 Thread Dou Liyang
1. Online memory-less nodes at boot time to map cpus of memory-less nodes. 2. Build zonelists for memory-less nodes so that memory allocator will fall back to proper nodes automatically. Change log v1 -> v2: 1. Split code movement and actual changes. Add patch 1. 2. Synchronize best near

[PATCH v10 3/7] x86, acpi, cpu-hotplug: Introduce cpuid_to_apicid[] array to store persistent cpuid <-> apicid mapping.

2016-07-26 Thread Dou Liyang
ned-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/mpspec.h | 1 + arch/x86/kernel/acpi/boot.c | 6 ++--- arch/x86/kernel/apic/apic.c | 61 +++

[PATCH v10 1/7] x86, memhp, numa: Online memory-less nodes at boot time.

2016-07-26 Thread Dou Liyang
ld zonelists for these nodes. As a result, when cpus on these memory-less nodes try to allocate memory from local node, it will automatically fall back to the proper zones in the zonelists. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.

Re: [PATCH v9 0/7] Make cpuid <-> nodeid mapping persistent

2016-07-25 Thread Dou Liyang
在 2016年07月26日 07:20, Andrew Morton 写道: On Mon, 25 Jul 2016 16:35:42 +0800 Dou Liyang <douly.f...@cn.fujitsu.com> wrote: [Problem] cpuid <-> nodeid mapping is firstly established at boot time. And workqueue caches the mapping in wq_numa_possible_cpumask in wq_numa_init() at boot

Re: [PATCH v9 0/7] Make cpuid <-> nodeid mapping persistent

2016-07-26 Thread Dou Liyang
Hi, RJ 在 2016年07月26日 19:53, Rafael J. Wysocki 写道: On Tuesday, July 26, 2016 11:59:38 AM Dou Liyang wrote: 在 2016年07月26日 07:20, Andrew Morton 写道: On Mon, 25 Jul 2016 16:35:42 +0800 Dou Liyang <douly.f...@cn.fujitsu.com> wrote: [Problem] cpuid <-> nodeid mapping is firstly

[PATCH v9 5/7] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-07-25 Thread Dou Liyang
jitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/ia64/kernel/acpi.c | 3 +- arch/x86/kernel/acpi/boot.c | 4 ++- drivers/acpi/acpi_processor.c | 5 +++ drivers/acpi

[PATCH v9 0/7] Make cpuid <-> nodeid mapping persistent

2016-07-25 Thread Dou Liyang
pu areas were initialized. Change log v2 -> v3: 1. Online memory-less nodes at boot time to map cpus of memory-less nodes. 2. Build zonelists for memory-less nodes so that memory allocator will fall back to proper nodes automatically. Change log v1 -> v2: 1. Split code movement and actual

[PATCH v9 6/7] acpi: Provide the mechanism to validate processors in the ACPI tables

2016-07-25 Thread Dou Liyang
as being unreasonable; The function will record the unique or duplicate processor IDs. The duplicate processor IDs such as 89 are regarded as the unreasonable IDs which mean that the processor objects in question are not valid. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- dri

[PATCH v9 1/7] x86, memhp, numa: Online memory-less nodes at boot time.

2016-07-25 Thread Dou Liyang
ld zonelists for these nodes. As a result, when cpus on these memory-less nodes try to allocate memory from local node, it will automatically fall back to the proper zones in the zonelists. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.

[PATCH v9 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-07-25 Thread Dou Liyang
ished step 1. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 26 +

[PATCH v9 4/7] x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid.

2016-07-25 Thread Dou Liyang
at caller is able to control if disabled processors are ignored. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.

[PATCH v9 3/7] x86, acpi, cpu-hotplug: Introduce cpuid_to_apicid[] array to store persistent cpuid <-> apicid mapping.

2016-07-25 Thread Dou Liyang
ned-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/mpspec.h | 1 + arch/x86/kernel/acpi/boot.c | 6 ++--- arch/x86/kernel/apic/apic.c | 61 +++

[PATCH v9 7/7] acpi: Provide the interface to validate the proc_id

2016-07-25 Thread Dou Liyang
. When we establish all possible cpuid <-> nodeid mapping to handle the cpu hotplugs, we will use the proc_id from ACPI table. We do validation when we get the proc_id. If the result is true, we will stop the mapping. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi

[PATCH v8 0/7] Make cpuid <-> nodeid mapping persistent

2016-07-19 Thread Dou Liyang
s so that memory allocator will fall back to proper nodes automatically. Change log v1 -> v2: 1. Split code movement and actual changes. Add patch 1. 2. Synchronize best near online node record when node hotplug happens. In patch 2. 3. Fix some comment. Dou Liyang (2): Provide the

[PATCH v8 1/7] x86, memhp, numa: Online memory-less nodes at boot time.

2016-07-19 Thread Dou Liyang
these nodes. As a result, when cpus on these memory-less nodes try to allocate memory from local node, it will automatically fall back to the proper zones in the zonelists. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> ---

[PATCH v8 3/7] x86, acpi, cpu-hotplug: Introduce cpuid_to_apicid[] array to store persistent cpuid <-> apicid mapping.

2016-07-19 Thread Dou Liyang
ned-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/mpspec.h | 1 + arch/x86/kernel/acpi/boot.c | 6 ++--- arch/x86/kernel/apic/apic.c | 61 +++

[PATCH v8 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-07-19 Thread Dou Liyang
ished step 1. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 26 +

[PATCH v8 6/7] Provide the mechanism to validate processors in the ACPI tables

2016-07-19 Thread Dou Liyang
easonable; The function will record the unique or duplicate processor IDs. The duplicate processor IDs such as 89 are regarded as the unreasonable IDS which mean that the processor objects in question are not valid. Signed-off-by: Dou Li

[PATCH v8 4/7] x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid.

2016-07-19 Thread Dou Liyang
at caller is able to control if disabled processors are ignored. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.

[PATCH v8 7/7] Provide the interface to validate the proc_id which they give

2016-07-19 Thread Dou Liyang
establish all possible cpuid <-> nodeid mapping, we will use the proc_id from ACPI table. We do validation when we get the proc_id. If the result is true, we will stop the mapping. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi/acpi_processor.c | 16

[PATCH v8 5/7] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-07-19 Thread Dou Liyang
jitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/ia64/kernel/acpi.c | 3 +- arch/x86/kernel/acpi/boot.c | 4 ++- drivers/acpi/acpi_processor.c | 5 drivers/acpi/

Re: [PATCH v8 7/7] Provide the interface to validate the proc_id which they give

2016-07-19 Thread Dou Liyang
在 2016年07月20日 02:53, Tejun Heo 写道: On Tue, Jul 19, 2016 at 03:28:08PM +0800, Dou Liyang wrote: When we want to identify whether the proc_id is unreasonable or not, we can call the "acpi_processor_validate_proc_id" function. It will search in the duplicate IDs. If we find t

Re: [PATCH v8 5/7] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-07-19 Thread Dou Liyang
在 2016年07月20日 04:06, Rafael J. Wysocki 写道: On Tuesday, July 19, 2016 03:28:06 PM Dou Liyang wrote: From: Gu Zheng <guz.f...@cn.fujitsu.com> The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So that, when node online/offline happens, cache based on cpui

Re: [PATCH v8 1/7] x86, memhp, numa: Online memory-less nodes at boot time.

2016-07-19 Thread Dou Liyang
在 2016年07月20日 02:50, Tejun Heo 写道: Hello, On Tue, Jul 19, 2016 at 03:28:02PM +0800, Dou Liyang wrote: In this series of patches, we are going to construct cpu <-> node mapping for all possible cpus at boot time, which is a 1-1 mapping. It means the 1-1 mapping means that each cpu is

[PATCH v11 3/7] x86, acpi, cpu-hotplug: Introduce cpuid_to_apicid[] array to store persistent cpuid <-> apicid mapping.

2016-08-08 Thread Dou Liyang
icid mapping when registering local apic. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/

[PATCH v11 6/7] acpi: Provide the mechanism to validate processors in the ACPI tables

2016-08-08 Thread Dou Liyang
as being unreasonable; The function will record the unique or duplicate processor IDs. The duplicate processor IDs such as 89 are regarded as the unreasonable IDs which mean that the processor objects in question are not valid. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- dri

[PATCH v11 5/7] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-08-08 Thread Dou Liyang
jitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/ia64/kernel/acpi.c | 3 +- arch/x86/kernel/acpi/boot.c | 4 ++- drivers/acpi/acpi_processor.c | 5 drivers/acpi

[PATCH v11 4/7] x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid.

2016-08-08 Thread Dou Liyang
at caller is able to control if disabled processors are ignored. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.

[PATCH v11 0/7] Make cpuid <-> nodeid mapping persistent

2016-08-08 Thread Dou Liyang
s nodes so that memory allocator will fall back to proper nodes automatically. Change log v1 -> v2: 1. Split code movement and actual changes. Add patch 1. 2. Synchronize best near online node record when node hotplug happens. In patch 2. 3. Fix some comment. Dou Liyang (2): acpi: Provi

[PATCH v11 1/7] x86, memhp, numa: Online memory-less nodes at boot time.

2016-08-08 Thread Dou Liyang
ld zonelists for these nodes. As a result, when cpus on these memory-less nodes try to allocate memory from local node, it will automatically fall back to the proper zones in the zonelists. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.

[PATCH v11 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-08-08 Thread Dou Liyang
pus are ignored. 4. Establish all possible cpuid <-> nodeid mapping. This is done via an additional acpi namespace walk for processors. This patch finished step 1. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Z

[PATCH v11 7/7] acpi: Provide the interface to validate the proc_id

2016-08-08 Thread Dou Liyang
. When we establish all possible cpuid <-> nodeid mapping to handle the cpu hotplugs, we will use the proc_id from ACPI table. We do validation when we get the proc_id. If the result is true, we will stop the mapping. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi

Re: [PATCH v10 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-08-02 Thread Dou Liyang
Hi tglx, 在 2016年07月29日 21:36, Thomas Gleixner 写道: On Tue, 26 Jul 2016, Dou Liyang wrote: 1. Enable apic registeration flow to handle both enabled and disabled cpus. This is done by introducing an extra parameter to generic_processor_info to let the caller control if disabled cpus

Re: [PATCH v11 0/7] Make cpuid <-> nodeid mapping persistent

2016-08-17 Thread Dou Liyang
Ping ... May I ask for some community attention to this series? My purpose is fixing the memory allocation failure sometimes when hot-plugging it. Thanks in advance. dou At 08/08/2016 04:37 PM, Dou Liyang wrote: [Problem] cpuid <-> nodeid mapping is firstly established at boo

[PATCH] x86/apic: Fix a typo in a comment line

2017-02-06 Thread Dou Liyang
Add a missing character in the function description. s/bringin /bringing / Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c

Re: [PATCH v2 0/4] Revert works for the mapping of cpuid <-> nodeid

2017-02-21 Thread Dou Liyang
Hi, Xiaolong At 02/21/2017 03:10 PM, Ye Xiaolong wrote: On 02/21, Ye Xiaolong wrote: On 02/20, Dou Liyang wrote: Currently, We make the mapping of "cpuid <-> nodeid" fixed at the booting time. It keeps consistent with the WorkQueue and avoids some bugs which may be cause

Re: [PATCH 1/2] acpi: Fix the mapping handle in case of declaring processors using the Device operator

2017-02-16 Thread Dou Liyang
At 02/16/2017 09:06 PM, Hanjun Guo wrote: On 2017/2/16 18:38, Dou Liyang wrote: In ACPI spec, we can declare processors using both Processor and Device operator. But now, we just handle the mapping of processors which are declared by Processor operator. It misses the processors declared

[PATCH] x86/apic: Remove the extra judgement of skipped IO APIC setup

2017-02-23 Thread Dou Liyang
ve the one in try_to_enable_IR() and refine them for better readability. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic

[PATCH 1/2] Revert"x86/acpi: Set persistent cpuid <-> nodeid mapping when booting"

2017-02-19 Thread Dou Liyang
of the ACPI table. The patch revert the commit dc6db24d24: "x86/acpi: Set persistent cpuid <-> nodeid mapping when booting". Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/acpi/boot.c | 2 +- drivers/acpi/acpi_processor.c | 5 --- dr

[PATCH 2/2] Revert"x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid"

2017-02-19 Thread Dou Liyang
After we never do the last mapping of "cpuid <-> nodeid" at booting time. we also no need to enable MADT APIs to return disabled apicid. So, The patch work for reverting the commit 8ad893faf2: "x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid" Signed-o

[PATCH 0/2] Revert works for the mapping of cpuid <-> nodeid

2017-02-19 Thread Dou Liyang
at booting time where we did some useless work. It also can make the mapping of "cpuid <-> nodeid" fixed and avoid excessive use of the ACPI table. We have tested them in our box: Fujitsu PQ2000 with 2 nodes for hot-plug. To Xiaolong: Please help me to test it in the sp

[PATCH v2 1/4] Revert"x86/acpi: Set persistent cpuid <-> nodeid mapping when booting"

2017-02-20 Thread Dou Liyang
of the ACPI table. The patch revert the commit dc6db24d24: "x86/acpi: Set persistent cpuid <-> nodeid mapping when booting". Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/acpi/boot.c | 2 +- drivers/acpi/acpi_processor.c | 5 --- dr

[PATCH v2 4/4] acpi: Move the verification of duplicate proc_id from booting time to hot-plug time

2017-02-20 Thread Dou Liyang
After we revert the the mapping of "cpuid <-> nodeid" fixed at the booting time. and do it at the hot-plug time. we should also do the verification of duplicate proc_id at the time. The patch rename the verfication function and move it to drivers/acpi::acpi_processor_get_info. Si

[PATCH v2 0/4] Revert works for the mapping of cpuid <-> nodeid

2017-02-20 Thread Dou Liyang
at booting time where we did some useless work. It also can make the mapping of "cpuid <-> nodeid" fixed and avoid excessive use of the ACPI table. We have tested them in our box: Fujitsu PQ2000 with 2 nodes for hot-plug. To Xiaolong: Please help me to test it in the special m

[PATCH v2 3/4] acpi: Fix the check handle in case of declaring processors using the Device operator

2017-02-20 Thread Dou Liyang
. It misses the processors declared by Device operator. The patch adds the case of Device operator. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi/acpi_processor.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/d

[PATCH v2 2/4] Revert"x86/acpi: Enable MADT APIs to return disabled apicids"

2017-02-20 Thread Dou Liyang
After we never do the last mapping of "cpuid <-> nodeid" at booting time. we also no need to enable MADT APIs to return disabled apicid. So, The patch work for reverting the commit 8ad893faf2: "x86/acpi: Enable MADT APIs to return disabled apicids" Signed-o

Re: [lkp] [x86/acpi] dc6db24d24: BUG: unable to handle kernel paging request at 0000116007090008

2017-02-12 Thread Dou Liyang
Hi, Xiaolong At 02/13/2017 09:37 AM, Ye Xiaolong wrote: On 11/21, Dou Liyang wrote: Hi, Xiaolong, At 11/21/2016 09:31 AM, Ye Xiaolong wrote: On 11/18, Dou Liyang wrote: Hi xiaolong At 11/18/2016 02:16 PM, Ye Xiaolong wrote: Hi, liyang Sorry for the late. On 10/31, Dou Liyang wrote: Hi

Re: [lkp] [x86/acpi] dc6db24d24: BUG: unable to handle kernel paging request at 0000116007090008

2017-02-13 Thread Dou Liyang
Hi Xiaolong [...] Sorry for my neglect, the result for fd74da217df7d4bd25e95411da showed no dmesg because it's incomplete run and has no demsg stat at all. Is that means: you have already tested the Linux branch which contains the commit fd74da217df7d. and it doesn't work well. Btw, Why

[PATCH 2/2] acpi: Fix the check handle in case of declaring processors using the Device operator

2017-02-16 Thread Dou Liyang
. It misses the processors declared by Device operator. The patch adds the case of Device operator. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi/acpi_processor.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/d

[PATCH 1/2] acpi: Fix the mapping handle in case of declaring processors using the Device operator

2017-02-16 Thread Dou Liyang
In ACPI spec, we can declare processors using both Processor and Device operator. But now, we just handle the mapping of processors which are declared by Processor operator. It misses the processors declared by Device operator. The patch adds this case of the Device operator. Signed-off-by: Dou

[PATCH] x86/acpi: Fix a warning message in logical CPU IDs allocation

2017-02-27 Thread Dou Liyang
d the rest are ignored. Fix the warning message, replace "nr_cpu_ids - 1" with "nr_cpu_ids". And the warning message can be like that: APIC: NR_CPUS/possible_cpus limit of 2 reached. Processor 2/0x2 and the rest are ignored. Signed-off-by: Dou Liyang <douly.f

Re: CPU: 0 PID: 0 at arch/x86/kernel/apic/apic.c:2066

2017-02-27 Thread Dou Liyang
Hi Marco, After Linux-4.9, we also mapped the logical CPU IDs for the disabled CPUs. The reason of the warning maybe that: The max number of the CPU in "dl360g5" is 2 (NR_CPUS:2), but, the kernel mapped one of the number to a disabled CPUs, so one of the enable CPUs will never have a cpu_id,

Re: [PATCH v2 3/4] acpi: Fix the check handle in case of declaring processors using the Device operator

2017-03-02 Thread Dou Liyang
Hi tglx, At 03/01/2017 07:12 PM, Thomas Gleixner wrote: On Mon, 20 Feb 2017, Dou Liyang wrote: In ACPI spec, we can declare processors using both Processor and Device operator. And before we use the ACPI table, we should check the correctness for all processors in ACPI namespace

Re: [PATCH v2 1/4] Revert"x86/acpi: Set persistent cpuid <-> nodeid mapping when booting"

2017-03-02 Thread Dou Liyang
it. I love it so much. I will try to improve myself and help others. :) Thanks, Liyang. At 03/01/2017 06:51 PM, Thomas Gleixner wrote: On Mon, 20 Feb 2017, Dou Liyang wrote: Currently, We make the mapping of "cpuid <-> nodeid" fixed at the booting time. It

Re: [PATCH v2 4/4] acpi: Move the verification of duplicate proc_id from booting time to hot-plug time

2017-03-02 Thread Dou Liyang
Hi tglx, At 03/01/2017 07:26 PM, Thomas Gleixner wrote: On Mon, 20 Feb 2017, Dou Liyang wrote: Please make your subject line short and a precise summary phrase, not an overlong sentence. After we revert the the mapping of "cpuid <-> nodeid" fixed at the booting time. and

Re: [PATCH v2 2/4] Revert"x86/acpi: Enable MADT APIs to return disabled apicids"

2017-03-02 Thread Dou Liyang
Hi tglx, At 03/01/2017 06:52 PM, Thomas Gleixner wrote: On Mon, 20 Feb 2017, Dou Liyang wrote: After we never do the last mapping of "cpuid <-> nodeid" at booting time. we also no need to enable MADT APIs to return disabled apicid. So, The patch work for reverting the commit

Re: [PATCH] x86/acpi: Fix a warning message in logical CPU IDs allocation

2017-03-01 Thread Dou Liyang
Hi Ingo, At 03/01/2017 05:10 PM, Ingo Molnar wrote: * Dou Liyang <douly.f...@cn.fujitsu.com> wrote: Current warning message regarded the "nr_cpu_ids - 1" as the limit number of the CPUs. It may be confused us, for example: we have two CPUs, nr_cpu_ids = 2, but the war

Re: [PATCH] x86/apic: Remove the extra judgement of skipped IO APIC setup

2017-03-01 Thread Dou Liyang
Dear Ingo, At 03/01/2017 05:04 PM, Ingo Molnar wrote: [...] + pr_info("Not init interrupt remapping due to skipped IO-APIC setup\n"); So you replaced a perfectly readable kernel message: - pr_info("Not enabling interrupt remapping due to skipped IO-APIC

[PATCH v12 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-08-25 Thread Dou Liyang
ished step 1. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 18 +

[PATCH v12 3/7] x86, acpi, cpu-hotplug: Introduce cpuid_to_apicid[] array to store persistent cpuid <-> apicid mapping.

2016-08-25 Thread Dou Liyang
ned-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/mpspec.h | 1 + arch/x86/kernel/acpi/boot.c | 7 + arch/x86/kernel/apic/apic.c | 61 +++

[PATCH v12 7/7] acpi: Provide the interface to validate the proc_id

2016-08-25 Thread Dou Liyang
. When we establish all possible cpuid <-> nodeid mapping to handle the cpu hotplugs, we will use the proc_id from ACPI table. We do validation when we get the proc_id. If the result is true, we will stop the mapping. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- drivers/acpi

[PATCH v12 4/7] x86, acpi, cpu-hotplug: Enable MADT APIs to return disabled apicid.

2016-08-25 Thread Dou Liyang
at caller is able to control if disabled processors are ignored. Signed-off-by: Gu Zheng <guz.f...@cn.fujitsu.com> Signed-off-by: Tang Chen <tangc...@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.

[PATCH v12 5/7] x86, acpi, cpu-hotplug: Set persistent cpuid <-> nodeid mapping when booting.

2016-08-25 Thread Dou Liyang
jitsu.com> Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/ia64/kernel/acpi.c | 3 +- arch/x86/kernel/acpi/boot.c | 4 ++- drivers/acpi/acpi_processor.c | 5 drivers/acpi

[PATCH v12 1/7] x86, memhp, numa: Online memory-less nodes at boot time.

2016-08-25 Thread Dou Liyang
ld zonelists for these nodes. As a result, when cpus on these memory-less nodes try to allocate memory from local node, it will automatically fall back to the proper zones in the zonelists. Signed-off-by: Zhu Guihua <zhugh.f...@cn.fujitsu.com> Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.

[PATCH v12 0/7] Make cpuid <-> nodeid mapping persistent

2016-08-25 Thread Dou Liyang
alized. Change log v2 -> v3: 1. Online memory-less nodes at boot time to map cpus of memory-less nodes. 2. Build zonelists for memory-less nodes so that memory allocator will fall back to proper nodes automatically. Change log v1 -> v2: 1. Split code movement and actual changes. Add patch 1.

[PATCH v12 6/7] acpi: Provide the mechanism to validate processors in the ACPI tables

2016-08-25 Thread Dou Liyang
as being unreasonable; The function will record the unique or duplicate processor IDs. The duplicate processor IDs such as 89 are regarded as the unreasonable IDs which mean that the processor objects in question are not valid. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- dri

Re: [PATCH v12 0/7] Make cpuid <-> nodeid mapping persistent

2016-08-25 Thread Dou Liyang
s, Dou. At 08/25/2016 04:35 PM, Dou Liyang wrote: [Summary] Use ACPI tables: MADT, DSDT. 1. Create cpuid in order based on Local Apic ID in MADT(apicid). 2. Obtain the nodeid by the proc_id in DSDT. 3. Make the cpuid <-> nodeid mapping persistent. The mapping relations: proc_id in DSDT <-

Re: [PATCH v12 2/7] x86, acpi, cpu-hotplug: Enable acpi to register all possible cpus at boot time.

2016-08-25 Thread Dou Liyang
Hi tglx, At 08/25/2016 04:35 PM, Dou Liyang wrote: arch/x86/kernel/apic/apic.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index cea4fc1..e5612a9 100644 --- a/arch/x86/kernel/apic/apic.c +++ b

[PATCH] x86: Put the num_processors++ code in a more suitable position

2016-09-05 Thread Dou Liyang
incorrect. Just put the num_processors++ code in the more suitable position. it makes sure that the num-processors will not conflict with the disabled_cpus. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

Re: [PATCH] x86: Put the num_processors++ code in a more suitable position

2016-09-06 Thread Dou Liyang
Hi David, At 09/07/2016 05:23 AM, David Rientjes wrote: On Tue, 6 Sep 2016, Dou Liyang wrote: This is a code optimization. Not sure that it's optimization, it's just for correctness. Yes, I see. I will improve it in next version. Thanks, Dou If checking the topology package map

[PATCH v2] x86: Put the num_processors++ code in a more suitable position

2016-09-06 Thread Dou Liyang
of processors incorrect. Just put the num_processors++ code in the more suitable position. it makes sure that the num-processors will not conflict with the disabled_cpus. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> Acked-by: David Rientjes <rient...@google.com> --- arch/x86/kernel/api

Re: [PATCH v12 0/7] Make cpuid <-> nodeid mapping persistent

2016-09-02 Thread Dou Liyang
Ping... At 08/25/2016 04:35 PM, Dou Liyang wrote: [Summary] Use ACPI tables: MADT, DSDT. 1. Create cpuid in order based on Local Apic ID in MADT(apicid). 2. Obtain the nodeid by the proc_id in DSDT. 3. Make the cpuid <-> nodeid mapping persistent. The mapping relations: proc_id i

Re: [PATCH v12 0/7] Make cpuid <-> nodeid mapping persistent

2016-09-13 Thread Dou Liyang
Ping... At 09/02/2016 02:57 PM, Dou Liyang wrote: Ping... At 08/25/2016 04:35 PM, Dou Liyang wrote: [Summary] Use ACPI tables: MADT, DSDT. 1. Create cpuid in order based on Local Apic ID in MADT(apicid). 2. Obtain the nodeid by the proc_id in DSDT. 3. Make the cpuid <-> nodeid m

Re: [x86-tip] strange nr_cpus= boot regression

2016-09-26 Thread Dou Liyang
Gleixner wrote: CC'ed: Dou Liyang On Mon, 26 Sep 2016, Mike Galbraith wrote: I've encountered a strange regression in tip, symptom is that if you boot with nr_cpus=nr_you_have, what actually boots is nr_you_have/2. Do not pass nr_cpus=, and all is well. What's the number of possible cpus

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-06 Thread Dou Liyang
Hi Yinghai, At 10/06/2016 12:53 PM, Yinghai Lu wrote: On Wed, Oct 5, 2016 at 7:04 AM, Thomas Gleixner wrote: @@ -176,6 +177,11 @@ static int acpi_register_lapic(int id, u return -EINVAL; } +if (!enabled && (id == disabled_id)) { +++disabled_cpus;

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-06 Thread Dou Liyang
Hi Yinghai At 10/07/2016 05:20 AM, Yinghai Lu wrote: On Thu, Oct 6, 2016 at 1:06 AM, Dou Liyang <douly.f...@cn.fujitsu.com> wrote: I seem to remember that in x2APIC Spec the x2APIC ID may be at 255 or greater. Good to know. Maybe later when one package have more cores like 30 cor

[PATCH 1/2] x86/acpi: Fix the local APIC id validation in case of 0xff

2016-10-08 Thread Dou Liyang
In MADT, the 0xff is an invalid local APIC id. When the kernel uses both the local APIC id and x2apic id, it may affect x2apic. Only add validation when the kernel parse the local APIC ids. Reported-by: Yinghai Lu <ying...@kernel.org> Signed-off-by: Dou Liyang <douly.f...@cn.fu

[PATCH 0/2] Fix the local APIC id validation in case of 0xff

2016-10-08 Thread Dou Liyang
The patches are for the problem which is in below link. https://lkml.org/lkml/2016/10/4/39 Dou Liyang (2): x86/acpi: Fix the local APIC id validation in case of 0xff x86/acpi: Fix error handling steps in parsing the lapic/x2apic entry arch/x86/kernel/acpi/boot.c | 35

[PATCH 2/2] x86/acpi: Fix error handling steps in parsing the lapic/x2apic entry

2016-10-08 Thread Dou Liyang
Originally, in acpi_parse_x2apic(), when the apic_id is invalid and enabled is false, the acpi_register_lapic() also can be executed. This does not make sense. Optimize the decision logic to avoid performing meaningless operations if the apic_id is invalid. Signed-off-by: Dou Liyang <doul

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-07 Thread Dou Liyang
Hi tglx, At 10/07/2016 09:07 PM, Thomas Gleixner wrote: On Thu, 6 Oct 2016, Dou Liyang wrote: + if (processor->id >= 255) { + ++disabled_cpus; Incrementing disabled_cpus here is simply wrong because 0xff is an invalid local APIC id. So we can simply return -

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-07 Thread Dou Liyang
Hi tglx, At 10/07/2016 09:00 PM, Thomas Gleixner wrote: On Fri, 7 Oct 2016, Thomas Gleixner wrote: On Fri, 7 Oct 2016, Dou Liyang wrote: Is it possible that the "-1/ox" could appear in the MADT which is one of the ACPI tables? According to the SDM the x2apic id is a 32

Re: [lkp] [x86/acpi] dc6db24d24: BUG: unable to handle kernel paging request at 0000116007090008

2016-10-20 Thread Dou Liyang
Hi xiaolong, Thank you very much for report. I was just investigating the related problem in another patches. At 10/20/2016 09:16 AM, kernel test robot wrote: FYI, we noticed the following commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master commit

Re: [x86/acpi] 04c197c080: BUG: unable to handle kernel paging request at 0000003000000010

2016-11-01 Thread Dou Liyang
ncorrectly. Thanks, Dou. This patch is repeated with him At 10/11/2016 10:15 AM, kernel test robot wrote: FYI, we noticed the following commit: https://github.com/0day-ci/linux Dou-Liyang/Fix-the-local-APIC-id-validation-in-case-of-0xff/20161008-154907 commit 04c197c080f2ed7a022f79701455c6837f4b

[PATCH v2] x86/apic: Fix two typos in comments

2017-01-05 Thread Dou Liyang
s/ID/IDs/ s/inr_logical_cpuidi/nr_logical_cpuids/ s/generic_processor_info()/__generic_processor_info()/ Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/apic/ap

Re: [PATCH] x86/apic: Fix two typos in comments

2017-01-05 Thread Dou Liyang
Hi, Ingo At 01/05/2017 04:15 PM, Ingo Molnar wrote: * Dou Liyang <douly.f...@cn.fujitsu.com> wrote: s/inr_logical_cpuidi/nr_logical_cpuids/ s/generic_processor_info()/__generic_processor_info()/ Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/api

[PATCH] x86/apic: Fix two typos in comments

2016-12-25 Thread Dou Liyang
s/inr_logical_cpuidi/nr_logical_cpuids/ s/generic_processor_info()/__generic_processor_info()/ Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/kernel/apic/apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/apic.c b/ar

[RFC PATCH 2/6] x86/apic: Construct a framework for setuping APIC mode as soon as possible

2017-03-29 Thread Dou Liyang
is late which cause the dump-capture kernel hangs with 'notsc' option in 1st kernel option. and the use of these switches is messily. Before make the APIC mode setup earlier, construct a framework first to prepare for the work and make the logic clear. Signed-off-by: Dou Liyang <doul

[RFC PATCH 3/6] x86/apic: Extract APIC timer related code from apic_bsp_setup()

2017-03-29 Thread Dou Liyang
The apic_bsp_setup() contains the APIC timer related code, which leads to hard reuse the local APIC and I/O APIC setup independently. Extract the related code to a single function for setuping APIC in advance. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/inclu

[RFC PATCH 1/6] x86/apic: Replace init_bsp_APIC() with apic_virture_wire_mode_setup()

2017-03-29 Thread Dou Liyang
is y. Clarify it, also remove the redundant macros to increase readability Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/apic.h | 2 ++ arch/x86/kernel/apic/apic.c | 4 ++-- arch/x86/kernel/irqinit.c | 5 ++--- 3 files changed, 6 insertions(+), 5 del

[RFC PATCH 0/6] Unify the Interrupt Mode and setup it as soon as possible

2017-03-29 Thread Dou Liyang
l.org/lkml/2016/8/1/506 [3]. https://lkml.org/lkml/2016/7/25/1118 [4]. WARN_ON(max_loops <= 0) in setup_local_APIC() Dou Liyang (6): x86/apic: Replace init_bsp_APIC() with apic_virture_wire_mode_setup() x86/apic: Construct a framework for setuping APIC mode as soon as possible x86/apic:

[RFC PATCH 4/6] x86/apic: Make the APIC mode setup earlier for SMP-capable system

2017-03-29 Thread Dou Liyang
to init_IRQ(). Do it at the end of IRQ initialization for SMP-capable system. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/apic.h | 3 ++- arch/x86/kernel/apic/apic.c | 39 --- arch/x86/kernel/smpboot.c | 10 +--

[RFC PATCH 5/6] x86/apic: Make the APIC mode setup earlier for UP system

2017-03-29 Thread Dou Liyang
The SMP-capable system has already enable and setup the APIC mode as soon as possible. Do it for UP system and make the code clear. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/apic.h | 2 ++ arch/x86/kernel/apic/apic.

[RFC PATCH 6/6] x86/apic: Remove the apic_virture_wire_mode_setup()

2017-03-29 Thread Dou Liyang
Currently, enable and setup the interrupt mode has been advanced and has already included the virtual wire mode. Remove the apic_virture_wire_mode_setup() which works for the virtual wire mode originally. Signed-off-by: Dou Liyang <douly.f...@cn.fujitsu.com> --- arch/x86/include/asm/apic.

Re: [RFC PATCH 0/6] Unify the Interrupt Mode and setup it as soon as possible

2017-03-29 Thread Dou Liyang
at 10:55pm, Dou Liyang wrote: According to Ingo's and Eric's advice[1,2], Try my best to optimize the init of Interrupt Mode for x86. The MP specification defines three different interrupt modes as follows: 1. PIC Mode 2. Virtual Wire Mode 3. Symmetic I/O Mode Currently, In kernel, 1. Setup

Re: [RFC PATCH 0/6] Unify the Interrupt Mode and setup it as soon as possible

2017-03-29 Thread Dou Liyang
At 03/30/2017 11:03 AM, Dou Liyang wrote: Hi Baoquan, At 03/30/2017 10:08 AM, Baoquan He wrote: Hi Liyang, This is awesome. I planned to do this after kaslr back porting, glad to see your posting. I like below diagram and the idea of patch 2/6 framework. Will review and see what I can do

  1   2   3   4   5   6   >