[PATCH v3 0/3] ACPI: container hot remove support.

2012-10-31 Thread Tang Chen
is stopped, so that we don't need to kfree the ej_event if stopping container failed. This is based on Lu Yinghai's job. git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 Tang Chen (3): Use acpi_os_hotplug_execute() instead

[PATCH v3 2/3] Use kacpi_hotplug_wq to handle container hotplug event.

2012-10-31 Thread Tang Chen
() executed in kacpi_notify_wq or kacpid_wq. So, we need to put the real hotplug code into kacpi_hotplug_wq. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 34 ++ 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/drivers/acpi

[PATCH v3 1/3] Use acpi_os_hotplug_execute() instead of alloc_acpi_hp_work().

2012-10-31 Thread Tang Chen
is based on Lu Yinghai's tree: git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/osl.c | 28 drivers/acpi/pci_root_hp.c | 25

[PATCH v3 3/3] Improve container_notify_cb() to support container hot-remove.

2012-10-31 Thread Tang Chen
/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 63 ++--- 1 files changed, 53 insertions(+), 10 deletions(-) diff --git a/drivers/acpi

Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-10-31 Thread Tang Chen
On 10/31/2012 07:09 PM, Yasuaki Ishimatsu wrote: Hi Tang, If container device contains memory device, the function is very danger. As you know, we are developing a memory hotplug. If memory has kernel memory, memory hot remove operations fails. But container_device_remove() cannot realize

Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-10-31 Thread Tang Chen
Hi Yinghai, How do you think the 1st patch ? Is the idea OK with you ? And about the memory hotplug thing, so far as I know, we are trying to limit kernel memory in some nodes, and only support to hot-remove the nodes with out kernel memory. This functionality is called online_movable. And some

Re: [PATCH v3 1/3] Use acpi_os_hotplug_execute() instead of alloc_acpi_hp_work().

2012-11-01 Thread Tang Chen
On 11/01/2012 11:52 AM, Yinghai Lu wrote: On Wed, Oct 31, 2012 at 12:27 AM, Tang Chentangc...@cn.fujitsu.com wrote: Please check if you can just fold acpi_hp_cb_execute callers, and use acpi_os_hotplug_execute directly. and have two local conext struct too. I think this could bring some

Re: [PATCH v3 3/3] Improve container_notify_cb() to support container hot-remove.

2012-11-01 Thread Tang Chen
On 11/02/2012 12:43 AM, Toshi Kani wrote: Hi Tang, Rafael pointed out in my CPU hot-remove patch that acpi_bus_hot_remove_device() was not exported for modules. Looks like you have the same problem here. FYI, I just sent the following patch that exports acpi_bus_hot_remove_device() and

Re: [PATCH] Update sched_domains_numa_masks when new cpus are onlined.

2012-09-23 Thread Tang Chen
Hi, Would you please help to review this patch ? Thanks. :) On 09/18/2012 06:12 PM, Tang Chen wrote: Once array sched_domains_numa_masks is defined, it is never updated. When a new cpu on a new node is onlined, the coincident member in sched_domains_numa_masks is not initialized, and all

Re: [PATCH] Update sched_domains_numa_masks when new cpus are onlined.

2012-09-24 Thread Tang Chen
. And I get your address from the get_maintainer.pl script. On Tue, 2012-09-18 at 18:12 +0800, Tang Chen wrote: Once array sched_domains_numa_masks is defined, it is never updated. When a new cpu on a new node is onlined, Hmm, so there's hardware where you can boot with smaller nr_node_ids than

Re: [PATCH] Update sched_domains_numa_masks when new cpus are onlined.

2012-09-24 Thread Tang Chen
On 09/24/2012 05:57 PM, Srivatsa S. Bhat wrote: On 09/24/2012 03:08 PM, Peter Zijlstra wrote: + hotcpu_notifier(sched_domains_numa_masks_update, CPU_PRI_SCHED_ACTIVE); hotcpu_notifier(cpuset_cpu_active, CPU_PRI_CPUSET_ACTIVE); hotcpu_notifier(cpuset_cpu_inactive,

Re: [PATCH] Update sched_domains_numa_masks when new cpus are onlined.

2012-09-25 Thread Tang Chen
sched_domains_numa_levels (which is 0) won't be wrong. I'm not sure if this is the best way to settle this problem. If you have a better idea, please tell me. Thanks. :) On 09/25/2012 06:33 PM, Peter Zijlstra wrote: On Tue, 2012-09-25 at 10:39 +0800, Tang Chen wrote: @@ -6765,11 +6773,64 @@ static void

Re: [PATCH] Update sched_domains_numa_masks when new cpus are onlined.

2012-09-25 Thread Tang Chen
Hi Peter~ I will make a v2 patch-set following your comments and resent it soon. :) Thanks. :) On 09/25/2012 07:50 PM, Peter Zijlstra wrote: On Tue, 2012-09-25 at 19:45 +0800, Tang Chen wrote: Let's have an example here. sched_init_numa() { ... // A loop set

[PATCH v2 1/2] Ensure sched_domains_numa_levels safe in other functions.

2012-09-25 Thread Tang Chen
sched_domains_numa_masks[][] in other functions. This patch set sched_domains_numa_levels to 0 before initializing array sched_domains_numa_masks[][], and reset it to 'level' when sched_domains_numa_masks[][] is fully initialized. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Wen Congyang

[PATCH] Do not change worker's running cpu in cmci_rediscover().

2012-09-27 Thread Tang Chen
[ 6155.452019] [810982d0] ? __init_kthread_worker+0x70/0x70 [ 6155.452019] [8167c4c0] ? gs_change+0x13/0x13 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- arch/x86/kernel/cpu/mcheck/mce_intel.c | 34 +-- 1

[PATCH] Do not use cpu_to_node() to find an offlined cpu's node.

2012-10-07 Thread Tang Chen
nid. As a result, cpumask_of_node(-1) returns NULL, and causes ernel panic. This patch fixes this problem by judging if the nid is -1. If nid is not -1, a cpu on the same node will be picked. Else, a online cpu on another node will be picked. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

Re: [PATCH] Do not change worker's running cpu in cmci_rediscover().

2012-10-07 Thread Tang Chen
...@cn.fujitsu.com thanks, Lai On 09/27/2012 05:19 PM, Tang Chen wrote: 1. cmci_rediscover() is only called by the CPU_POST_DEAD event handler, which means the corresponding cpu has already dead. As a result, it won't be accessed in the for_each_online_cpu loop. So, we could change the if(cpu == dying

Re: [PATCH v3] Do not change worker's running cpu in cmci_rediscover().

2012-11-06 Thread Tang Chen
Hi Tony, Borislav, Would you please help to review this patch ? Thanks. ;) On 10/29/2012 11:01 AM, Tang Chen wrote: cmci_rediscover() used set_cpus_allowed_ptr() to change the current process's running cpu, and migrate itself to the dest cpu. But worker processes are not allowed

Re: [PATCH v3] Do not change worker's running cpu in cmci_rediscover().

2012-11-06 Thread Tang Chen
On 11/06/2012 10:44 PM, Borislav Petkov wrote: On Tue, Nov 06, 2012 at 07:17:26PM +0800, Tang Chen wrote: Hi Tony, Borislav, Would you please help to review this patch ? I'm guessing mingo or hpa haven't pulled yet: http://marc.info/?l=linux-kernelm=135163452500984 Hum, thank you very

[PATCH] Update start_pfn in zone and pg_data when spanned_pages == 0.

2012-11-06 Thread Tang Chen
] ? gs_change+0x13/0x13 .. [10535.045543] ---[ end trace 96d845dbf33fee11 ]--- Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- mm/memory_hotplug.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 56b758a..4aa313c

[PATCH v2 2/2] Do not change worker's running cpu in cmci_rediscover().

2012-10-18 Thread Tang Chen
some delay for the jobs. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- arch/x86/kernel/cpu/mcheck/mce_intel.c | 30 +- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck

[PATCH v2 0/2] Do not change worker's running cpu in cmci_rediscover().

2012-10-18 Thread Tang Chen
[ 6155.452019] [810982d0] ? __init_kthread_worker+0x70/0x70 [ 6155.452019] [8167c4c0] ? gs_change+0x13/0x13 Tang Chen (2): Replace if statement with WARN_ON_ONCE() in cmci_rediscover(). Do not change worker's running cpu in cmci_rediscover(). arch/x86/kernel/cpu/mcheck

[PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-18 Thread Tang Chen
cmci_rediscover() is only called by the CPU_POST_DEAD event handler, which means the corresponding cpu has already dead. As a result, it won't be accessed in the for_each_online_cpu loop. So, we could change the if(cpu == dying) statement into a WARN_ON_ONCE(). Signed-off-by: Tang Chen tangc

Re: [PATCH v2 0/2] Do not change worker's running cpu in cmci_rediscover().

2012-10-19 Thread Tang Chen
Hi, CC to Tejun Heo, and add change log: Changes from v1 to v2: - split one single patch into two. - use WARN_ON_ONCE() but not BUG_ON(), as Tejun said. Thanks. :) On 10/19/2012 01:45 PM, Tang Chen wrote: 1. cmci_rediscover() is only called by the CPU_POST_DEAD event handler, which

Re: [PATCH 1/1] Update acpi_root_bridge_list in container hotplug path.

2012-10-19 Thread Tang Chen
On 10/18/2012 12:28 AM, Yinghai Lu wrote: On Wed, Oct 17, 2012 at 12:39 AM, Tang Chentangc...@cn.fujitsu.com wrote: On 10/17/2012 01:18 PM, Yinghai Lu wrote: And also, I have another 2 questions, maybe you can help me. 1) Do we need to put PNP0A08 into acpi_pci_roots ? looks like we need to

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-21 Thread Tang Chen
On 10/20/2012 12:40 AM, Borislav Petkov wrote: On Fri, Oct 19, 2012 at 01:45:27PM +0800, Tang Chen wrote: cmci_rediscover() is only called by the CPU_POST_DEAD event handler, which means the corresponding cpu has already dead. As a result, it won't be accessed in the for_each_online_cpu loop

Re: [PATCH v2 2/2] Do not change worker's running cpu in cmci_rediscover().

2012-10-21 Thread Tang Chen
On 10/20/2012 01:21 AM, Luck, Tony wrote: In this case, the following BUG_ON in try_to_wake_up_local() will be triggered: BUG_ON(rq != this_rq()); Logically this looks OK - what is the test case to trigger this? I've done a moderate amount of testing of cpu online/offline while injecting

Re: [PATCH v2 2/2] Do not change worker's running cpu in cmci_rediscover().

2012-10-22 Thread Tang Chen
On 10/22/2012 06:18 PM, Borislav Petkov wrote: On Mon, Oct 22, 2012 at 11:33:16AM +0800, Tang Chen wrote: I have 2 nodes, node0 and node1. node1 could be hotpluged. node0 has cpu0 ~ cpu15, node1 has cpu16 ~ cpu31. I online all the cpus on node1, and hot-remove node1 directly. Hold on, I need

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-22 Thread Tang Chen
On 10/22/2012 06:14 PM, Borislav Petkov wrote: On Mon, Oct 22, 2012 at 10:10:24AM +0800, Tang Chen wrote: I don't why before we just jumped over it. But I think if we have an online cpu == dying here, it must be wrong. So I think we should warn it, not just jump over it. Why do we need

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-22 Thread Tang Chen
On 10/22/2012 06:14 PM, Borislav Petkov wrote: On Mon, Oct 22, 2012 at 10:10:24AM +0800, Tang Chen wrote: I don't why before we just jumped over it. But I think if we have an online cpu == dying here, it must be wrong. So I think we should warn it, not just jump over it. Why do we need

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-23 Thread Tang Chen
On 10/23/2012 05:52 PM, Borislav Petkov wrote: On Tue, Oct 23, 2012 at 10:55:13AM +0800, Tang Chen wrote: So, how about warn once, and continue: if (cpu == dying) { WARN_ON_ONCE(cpu == dying); continue; } or, use BUG_ON() instead ? Let me ask

Re: [PATCH v2] Fix a hard coding style when determining if a device is a container.

2012-10-23 Thread Tang Chen
Hi, Would somebody give some comments ? Thanks. :) On 10/12/2012 08:31 PM, Tang Chen wrote: ACPI0004,PNP0A05 and PNP0A06 are all defined in array container_device_ids[], so use it, but not the hard coding style. Also, introduce a new api is_container_device() to determine if a device

[PATCH 1/2] Use kacpi_hotplug_wq to handle container hotplug event.

2012-10-23 Thread Tang Chen
() executed in kacpi_notify_wq or kacpid_wq. So, we need to put the real hotplug code into kacpi_hotplug_wq. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 44 +++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git

[PATCH 0/2] ACPI: container hot remove support.

2012-10-23 Thread Tang Chen
Tang Chen (2): Use kacpi_hotplug_wq to handle container hotplug event. Container hot remove support. drivers/acpi/container.c | 102 +- 1 files changed, 92 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line unsubscribe

[PATCH 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-23 Thread Tang Chen
will call acpi_bus_trim(device, 1) to remove the container. This patch is based on Lu Yinghai's work. git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 58

Re: [PATCH v2 1/2] Replace if statement with WARN_ON_ONCE() in cmci_rediscover().

2012-10-23 Thread Tang Chen
Hi Luck, Borislav, OK, since you all think it is not necessary, I think I will drop patch1. And thanks for your comments. :) So, how about patch2 ? If you need more detail, please tell me. Thanks. :) On 10/24/2012 12:16 AM, Luck, Tony wrote: First of all, I do think I was answering your

[PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Tang Chen
will call acpi_bus_trim(device, 1) to remove the container. This patch is based on Lu Yinghai's work. git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 58

[PATCH v2 1/2] Use kacpi_hotplug_wq to handle container hotplug event.

2012-10-24 Thread Tang Chen
() executed in kacpi_notify_wq or kacpid_wq. So, we need to put the real hotplug code into kacpi_hotplug_wq. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 17 - 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/container.c b

[PATCH v2 0/2] ACPI: container hot remove support.

2012-10-24 Thread Tang Chen
job. git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 Tang Chen (2): Use kacpi_hotplug_wq to handle container hotplug event. Improve container_notify_cb() to support container hot-remove. drivers/acpi/container.c | 75

[PATCH v3] Fix a hard coding style when determining if a device is a container.

2012-10-24 Thread Tang Chen
from int to bool. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com --- drivers/acpi/container.c | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c

Re: [PATCH v2 1/2] Use kacpi_hotplug_wq to handle container hotplug event.

2012-10-24 Thread Tang Chen
tree: git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-split-pci-root-hp-2 On 10/24/2012 02:54 PM, Yasuaki Ishimatsu wrote: Hi Tang, 2012/10/24 15:05, Tang Chen wrote: As the comments in __acpi_os_execute() said: We can't run hotplug code in keventd_wq

Re: [PATCH v2 1/2] Use kacpi_hotplug_wq to handle container hotplug event.

2012-10-24 Thread Tang Chen
On 10/24/2012 02:54 PM, Yasuaki Ishimatsu wrote: Hi Tang, 2012/10/24 15:05, Tang Chen wrote: As the comments in __acpi_os_execute() said: We can't run hotplug code in keventd_wq/kacpid_wq/kacpid_notify_wq because the hotplug code may call driver .remove() functions, which

Re: [PATCH] Do not use cpu_to_node() to find an offlined cpu's node.

2012-10-09 Thread Tang Chen
Hi David, Thanks for reviewing this patch. :) On 10/09/2012 04:34 PM, Wen Congyang wrote: At 10/09/2012 02:21 PM, David Rientjes Wrote: On Mon, 8 Oct 2012, Tang Chen wrote: + /* If the cpu has been offlined, its nid was set to -1. */ + if (nid != -1) { NUMA_NO_NODE. Yes

[PATCH] Fix a hard coding style when determining if a device is a container.

2012-10-12 Thread Tang Chen
ACPI0004,PNP0A05 and PNP0A06 are all defined in array container_device_ids[], so use it, but not the hard coding style. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/container.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/acpi

[PATCH 0/3] Find pci root bridges by comparing HID from acpi_device_info, not acpi_device.

2012-10-12 Thread Tang Chen
a handle_hotplug_event_root() callback for it. These patches are based on Lu Yinghai's for-pci-root-bus-hotplug branch. Tang Chen (3): Introduce a new acpi to determine HID match. Do not use acpi_device to find pci root bridge in _init code. Check exit status of acpi_install_notify_handler() in find_root_bridges

[PATCH 2/3] Do not use acpi_device to find pci root bridge in _init code.

2012-10-12 Thread Tang Chen
(). And further more, no handle_hotplug_event_root() notifier will be installed for them. This patch introduces a new api to find all root bridges in system by getting HID directly from ACPI namespace, not depending on acpi_device struct. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers

[PATCH 3/3] Check exit status of acpi_install_notify_handler() in find_root_bridges().

2012-10-12 Thread Tang Chen
acpi_install_notify_handler() could fail. So check the exit status and give a better debug info. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/pci_root_hp.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/pci_root_hp.c b

[PATCH 1/3] Introduce a new acpi to determine HID match.

2012-10-12 Thread Tang Chen
This introduce a new api to determine if a HID matches a list of IDs. Different from acpi_match_device_ids(), the new api gets HID from acpi_device_info struct. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/scan.c | 24 include/acpi/acpi_bus.h

Re: [PATCH 22/40] PCI, acpiphp: Separate out hot-add support of pci host bridge

2012-10-12 Thread Tang Chen
Hi Yinghai, When I was reviewing this patch, I found a little problem. Please refer to email: [PATCH 0/3] Find pci root bridges by comparing HID from acpi_device_info, not acpi_device. I could be wrong. :) If I didn't consider your idea correct, or you have a better solution, please let me

Re: [PATCH 2/3] Do not use acpi_device to find pci root bridge in _init code.

2012-10-12 Thread Tang Chen
On 10/12/2012 06:36 PM, Jiang Liu wrote: On 2012-10-12 18:31, Tang Chen wrote: When the kernel is being initialized, and some hardwares are not added to system, there won't be acpi_device structs for these devices. But acpi_is_root_bridge() depends on acpi_device struct. As a result, all

Re: [PATCH 2/3] Do not use acpi_device to find pci root bridge in _init code.

2012-10-12 Thread Tang Chen
On 10/12/2012 06:54 PM, Jiang Liu wrote: I have sent a similar patch to Yinghai before. For simplicity, we could use acpi_match_object_info_ids() instead of acpi_match_device_ids() directly. Hum, I must have missed it. :) Using acpi_match_object_info_ids() directly seems good. I'm just worry

Re: [PATCH] Fix a hard coding style when determining if a device is a container.

2012-10-12 Thread Tang Chen
On 10/12/2012 06:10 PM, Yasuaki Ishimatsu wrote: Hi Tang, 2012/10/12 15:55, Tang Chen wrote: ACPI0004,PNP0A05 and PNP0A06 are all defined in array container_device_ids[], so use it, but not the hard coding style. The idea is good. Signed-off-by: Tang Chentangc...@cn.fujitsu.com

[PATCH v2] Fix a hard coding style when determining if a device is a container.

2012-10-12 Thread Tang Chen
ACPI0004,PNP0A05 and PNP0A06 are all defined in array container_device_ids[], so use it, but not the hard coding style. Also, introduce a new api is_container_device() to determine if a device is a container device. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Yasuaki

[PATCH 2/3 v2] Do not use acpi_device to find pci root bridge in _init code.

2012-10-12 Thread Tang Chen
(). And further more, no handle_hotplug_event_root() notifier will be installed for them. This patch introduces a new api to find all root bridges in system by getting HID directly from ACPI namespace, not depending on acpi_device struct. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off

[PATCH 1/3 v2] Introduce a new acpi to determine HID match.

2012-10-12 Thread Tang Chen
This introduce a new api to determine if a HID matches a list of IDs. Different from acpi_match_device_ids(), the new api gets HID from acpi_device_info struct. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/scan.c | 24 include/acpi/acpi_bus.h

[PATCH 3/3 v2] Check exit status of acpi_install_notify_handler() in find_root_bridges().

2012-10-12 Thread Tang Chen
acpi_install_notify_handler() could fail. So check the exit status and give a better debug info. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/pci_root_hp.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/pci_root_hp.c b

[PATCH 0/3 v2] Find pci root bridges by comparing HID from acpi_device_info, not acpi_device.

2012-10-12 Thread Tang Chen
() callback for it. These patches are based on Lu Yinghai's for-pci-root-bus-hotplug branch. Tang Chen (3): Introduce a new acpi to determine HID match. Do not use acpi_device to find pci root bridge in _init code. Check exit status of acpi_install_notify_handler() in find_root_bridges

Re: [PATCH 1/2] Use kacpi_hotplug_wq to handle container hotplug event.

2012-10-24 Thread Tang Chen
On 10/25/2012 01:33 AM, Toshi Kani wrote: On Tue, 2012-10-23 at 21:10 +0800, Tang Chen wrote: As the comments in __acpi_os_execute() said: We can't run hotplug code in keventd_wq/kacpid_wq/kacpid_notify_wq because the hotplug code may call driver .remove() functions

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Tang Chen
Hi Toshi, On 10/25/2012 01:14 AM, Toshi Kani wrote: On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: +static int container_device_remove(struct acpi_device *device) +{ + int ret; + struct acpi_eject_event *ej_event; + + /* stop container device at first */ + ret

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-25 Thread Tang Chen
Hi Toshi, On 10/26/2012 01:20 AM, Toshi Kani wrote: ... Why do you need to call acpi_bus_trim(device,0) to stop the container device first? This issue was introduced by Lu Yinghai, I think he could give a better answer than me. :) Please refer to the following url:

[PATCH v3] Do not change worker's running cpu in cmci_rediscover().

2012-10-28 Thread Tang Chen
This patch removes the set_cpus_allowed_ptr() call, and put the cmci rediscover jobs onto all the other cpus using system_wq. This could bring some delay for the jobs. Change log v1 - v2: 1) removed patch1, when an online cpu == dying, just continue; 2) rebased on the lastest kernel. Signed-off-by: Tang

[PATCH 1/1] Update acpi_root_bridge_list in container hotplug path.

2012-10-16 Thread Tang Chen
() acpi_root_handle_to_bridge() and call add_acpi_root_bridge() in acpi_bus_check_add() and call remove_acpi_root_bridge() in acpi_bus_remove(). This patch is based on Lu Yinghai's git tree branch for-pci-split-pci-root-hp-2. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/pci_root_hp.c | 20

Re: [PATCH v2] Fix a hard coding style when determining if a device is a container.

2012-10-16 Thread Tang Chen
Hi, Would anyone help to review this patch, and give some comments, please ? Thanks. :) On 10/12/2012 08:31 PM, Tang Chen wrote: ACPI0004,PNP0A05 and PNP0A06 are all defined in array container_device_ids[], so use it, but not the hard coding style. Also, introduce a new api

Re: [PATCH 1/1] Update acpi_root_bridge_list in container hotplug path.

2012-10-17 Thread Tang Chen
On 10/17/2012 01:18 PM, Yinghai Lu wrote: no, we don't need that. after closely looking, it seems we can dump acpi_root_bridge. please check if attached patch could work with container path. Hi Yinghai, Your patch seems working well. BTW, I actually found that the two lists,

Re: [PATCH 1/1] Update acpi_root_bridge_list in container hotplug path.

2012-10-17 Thread Tang Chen
On 10/17/2012 03:39 PM, Tang Chen wrote: On 10/17/2012 01:18 PM, Yinghai Lu wrote: no, we don't need that. after closely looking, it seems we can dump acpi_root_bridge. please check if attached patch could work with container path. Hi Yinghai, Your patch seems working well. BTW, I

Re: [PATCH 1/1] Update acpi_root_bridge_list in container hotplug path.

2012-10-17 Thread Tang Chen
On 10/18/2012 12:28 AM, Yinghai Lu wrote: On Wed, Oct 17, 2012 at 12:39 AM, Tang Chentangc...@cn.fujitsu.com wrote: On 10/17/2012 01:18 PM, Yinghai Lu wrote: And also, I have another 2 questions, maybe you can help me. 1) Do we need to put PNP0A08 into acpi_pci_roots ? looks like we need to

[PATCH] Add PNP0A08 into acpi_pci_roots array.

2012-10-17 Thread Tang Chen
acpi_pci_roots array doesn't include PNP0A08, which is PCI Express Root Bridge. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- drivers/acpi/pci_root.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 037b59c

Re: [PATCH] Do not use cpu_to_node() to find an offlined cpu's node.

2012-10-17 Thread Tang Chen
On 10/18/2012 08:52 AM, David Rientjes wrote: On Wed, 10 Oct 2012, David Rientjes wrote: Ok, so it's been a week and these patches are still in -mm. This is what I was afraid of: patches that both Peter and I nacked sitting in -mm and allow a NULL pointer dereference because no alternative

Re: [PATCH] Do not change worker's running cpu in cmci_rediscover().

2012-10-17 Thread Tang Chen
On 10/17/2012 07:08 AM, Tejun Heo wrote: On Thu, Sep 27, 2012 at 05:19:46PM +0800, Tang Chen wrote: 1. cmci_rediscover() is only called by the CPU_POST_DEAD event handler, which means the corresponding cpu has already dead. As a result, it won't be accessed in the for_each_online_cpu loop. So

Re: [PATCH] Add PNP0A08 into acpi_pci_roots array.

2012-10-17 Thread Tang Chen
On 10/18/2012 11:55 AM, Bjorn Helgaas wrote: On Wed, Oct 17, 2012 at 8:22 PM, Tang Chentangc...@cn.fujitsu.com wrote: acpi_pci_roots array doesn't include PNP0A08, which is PCI Express Root Bridge. You need to explain why this change is necessary. PNP0A08 devices will have a PNP0A03 _CID,

Re: [PATCH] firmware, memmap: fix firmware_map_entry leak

2013-04-15 Thread Tang Chen
Reviewed-by: Tang Chen tangc...@cn.fujitsu.com Thanks. :) On 04/15/2013 01:48 PM, Yasuaki Ishimatsu wrote: When hot removing a memory, a firmware_map_entry which has memory range of the memory is released by release_firmware_map_entry(). If the entry is allocated by bootmem

[PATCH 0/3] Little error fix and cleanup.

2013-04-15 Thread Tang Chen
This patch-set did the following things: patch1: Remove unused parameter nr_pages of pages_correctly_reserved(). patch2: Use CONFIG_MEMORY_HOTREMOVE to protect kernel_physical_mapping_remove(). patch3: Add comments for parameter nid for memblock_insert_region(). Tang Chen (3): mm: Remove

[PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved()

2013-04-15 Thread Tang Chen
nr_pages is not used in pages_correctly_reserved(). So remove it. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Wang Shilong wangsl-f...@cn.fujitsu.com Reviewed-by: Wen Congyang we...@cn.fujitsu.com --- drivers/base/memory.c |5 ++--- 1 files changed, 2 insertions(+), 3

[PATCH 3/3] memblock: Fix missing comment of memblock_insert_region().

2013-04-15 Thread Tang Chen
There is no comment for parameter nid of memblock_insert_region(). This patch adds comment for it. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- mm/memblock.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index b8d9147

[PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE.

2013-04-15 Thread Tang Chen
kernel_physical_mapping_remove() in CONFIG_MEMORY_HOTREMOVE. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/init_64.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 474e28f..dafdeb2 100644 --- a/arch

[PATCH v1 09/12] x86, acpi, numa, mem-hotplug: Introduce MEMBLK_HOTPLUGGABLE to mark and reserve hotpluggable memory.

2013-04-19 Thread Tang Chen
will be freed to buddy when memory initialization is done. This idea is from Wen Congyang we...@cn.fujitsu.com and Jiang Liu jiang@huawei.com. Suggested-by: Jiang Liu jiang@huawei.com Suggested-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm

[PATCH v1 00/12] Arrange hotpluggable memory in SRAT as ZONE_MOVABLE.

2013-04-19 Thread Tang Chen
in local node. Tang Chen (11): acpi: Print Hot-Pluggable Field in SRAT. page_alloc, mem-hotplug: Improve movablecore to {en|dis}able using SRAT. x86, numa, acpi, memory-hotplug: Introduce hotplug info into struct numa_meminfo. x86, numa, acpi, memory-hotplug: Consider hotplug info when

[PATCH v1 12/12] doc, page_alloc, acpi, mem-hotplug: Add doc for movablecore=acpi boot option.

2013-04-19 Thread Tang Chen
Since we modify movablecore boot option to support movablecore=acpi, this patch adds doc for it. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- Documentation/kernel-parameters.txt |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Documentation/kernel

[PATCH v1 08/12] x86, numa, memblock: Introduce MEMBLK_LOCAL_NODE to mark and reserve node-life-cycle data.

2013-04-19 Thread Tang Chen
mapping pagetable pages, based on Yinghai's patch. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/init.c | 16 include/linux/memblock.h |2 ++ mm/memblock.c|7 +++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git

[PATCH v1 02/12] acpi: Print Hot-Pluggable Field in SRAT.

2013-04-19 Thread Tang Chen
The Hot-Pluggable field in SRAT suggests if the memory could be hotplugged while the system is running. Print it as well when parsing SRAT will help users to know which memory is hotpluggable. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/srat.c |9 ++--- 1 files

[PATCH v1 10/12] x86, memblock, mem-hotplug: Free hotpluggable memory reserved by memblock.

2013-04-19 Thread Tang Chen
We reserved hotpluggable memory in memblock. And when memory initialization is done, we have to free it to buddy system. This patch free memory reserved by memblock with flag MEMBLK_HOTPLUGGABLE. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/memblock.h |1 + mm

[PATCH v1 07/12] x86, numa, mem-hotplug: Mark nodes which the kernel resides in.

2013-04-19 Thread Tang Chen
arrange them as un-hotpluggable. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/numa.c |6 ++ include/linux/memblock.h |1 + mm/memblock.c| 20 3 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/numa.c

[PATCH v1 04/12] x86, numa, acpi, memory-hotplug: Introduce hotplug info into struct numa_meminfo.

2013-04-19 Thread Tang Chen
to support it: - numa_add_memblk() - numa_add_memblk_to() And the following callers: - numaq_register_node() - dummy_numa_init() - amd_numa_init() - acpi_numa_memory_affinity_init() in x86 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/include/asm/numa.h

[PATCH v1 06/12] memblock, numa: Introduce flag into memblock.

2013-04-19 Thread Tang Chen
. Suggested-by: Wen Congyang we...@cn.fujitsu.com Suggested-by: Liu Jiang jiang@huawei.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/memblock.h |8 ++ mm/memblock.c| 56 + 2 files changed, 49 insertions(+), 15

[PATCH v1 01/12] x86: get pg_data_t's memory from other node

2013-04-19 Thread Tang Chen
the first allocation fails. Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Jiang Liu jiang@huawei.com --- arch/x86/mm/numa.c |5 ++--- 1 files changed, 2

[PATCH v1 03/12] page_alloc, mem-hotplug: Improve movablecore to {en|dis}able using SRAT.

2013-04-19 Thread Tang Chen
performance, just don't specify anything. The kernel will work as before. Suggested-by: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/memory_hotplug.h |3 +++ mm/page_alloc.c| 13 + 2 files changed

[PATCH v1 11/12] x86, numa, acpi, memory-hotplug: Make movablecore=acpi have higher priority.

2013-04-19 Thread Tang Chen
movablecore=acpi in kernel commandline, the kernel will use SRAT to arrange ZONE_MOVABLE, and it has higher priority then original movablecore and kernelcore boot option. For those who don't want this, just specify nothing. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- include/linux/memblock.h

[PATCH v1 05/12] x86, numa, acpi, memory-hotplug: Consider hotplug info when cleanup numa_meminfo.

2013-04-19 Thread Tang Chen
() logic like this: Merge blocks with the same hotpluggable type on the same node, holes between which don't overlap with memory on other nodes. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/numa.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff

[PATCH 01/11] x86: get pg_data_t's memory from other node

2013-04-05 Thread Tang Chen
the first allocation fails. Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Jiang Liu jiang@huawei.com --- arch/x86/mm/numa.c |5 ++--- 1 files changed, 2

[PATCH 02/11] acpi: Print hotplug info in SRAT.

2013-04-05 Thread Tang Chen
The Hot Pluggable field in SRAT points out if the memory could be hotplugged while the system is running. It is useful to print out this info when parsing SRAT. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/srat.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions

[PATCH 09/11] x86, numa, acpi, memory-hotplug: Sanitize zone_movable_limit[].

2013-04-05 Thread Tang Chen
that sanitize_zone_movable_limit() could use it. This is pointed out by Wu Jianguo wujian...@huawei.com. Reported-by: Wu Jianguo wujian...@huawei.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Liu Jiang jiang@huawei.com Reviewed-by: Wen Congyang we...@cn.fujitsu.com

[PATCH 10/11] x86, numa, acpi, memory-hotplug: make movablemem_map have higher priority

2013-04-05 Thread Tang Chen
If kernelcore or movablecore is specified at the same time with movablemem_map, movablemem_map will have higher priority to be satisfied. This patch will make find_zone_movable_pfns_for_nodes() calculate zone_movable_pfn[] with the limit from zone_movable_limit[]. Signed-off-by: Tang Chen tangc

[PATCH 00/11] Introduce movablemem_map=acpi boot option.

2013-04-05 Thread Tang Chen
Before this patch-set, we introduced movablemem_map boot option which allowed users to specify physical address ranges to set memory as movable. This is not user friendly enough for normal users. So now, we introduce just movablemem_map=acpi to allow users to enable/disable the kernel to use Hot

[PATCH 07/11] x86, numa, acpi, memory-hotplug: Make any node which the kernel resides in un-hotpluggable.

2013-04-05 Thread Tang Chen
. So we always set the nodes which the kernel resides in as non-movable. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/numa.c | 25 +++-- arch/x86/mm/srat.c | 17 - include/linux/mm.h |1 + 3 files changed, 36 insertions(+), 7 deletions

[PATCH 08/11] x86, numa, acpi, memory-hotplug: Introduce zone_movable_limit[] to store start pfn of ZONE_MOVABLE.

2013-04-05 Thread Tang Chen
is used to store the start pfn of each node's ZONE_MOVABLE. We update it each time we parsed a SRAT memory entry if necessary. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/numa.c | 16 ++-- include/linux/mm.h |2 ++ mm/page_alloc.c|1 + 3 files

[PATCH 11/11] x86, numa, acpi, memory-hotplug: Memblock limit with movablemem_map

2013-04-05 Thread Tang Chen
in memblock_overlaps_region() is not. So add CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect the use of movablecore_map in memblock_overlaps_region(). Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Reviewed-by: Wen Congyang we...@cn.fujitsu.com Reviewed-by: Lai Jiangshan la...@cn.fujitsu.com Tested-by: Lin Feng linf

[PATCH 04/11] x86, numa, acpi, memory-hotplug: Introduce hotplug info into struct numa_meminfo.

2013-04-05 Thread Tang Chen
() - numa_add_memblk_to() And the following callers: - numaq_register_node() - dummy_numa_init() - amd_numa_init() - acpi_numa_memory_affinity_init() in x86 Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/include/asm/numa.h |3 ++- arch/x86/kernel/apic/numaq_32.c

[PATCH 05/11] x86, numa, acpi, memory-hotplug: Consider hotplug info when cleanup numa_meminfo.

2013-04-05 Thread Tang Chen
() logic like this: Merge blocks with the same hotpluggable type on the same node, holes between which don't overlap with memory on other nodes. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch/x86/mm/numa.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff

[PATCH 06/11] X86, numa, acpi, memory-hotplug: Add hotpluggable ranges to movablemem_map.

2013-04-05 Thread Tang Chen
When parsing SRAT, we are able to know which memory ranges are hotpluggable, and we add them to movablemem_map. So movablemem_map could be used to prevent memblock from allocating memory in area which will be set as ZONE_MOVABLE later. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- arch

[PATCH 03/11] numa, acpi, memory-hotplug: Add movablemem_map=acpi boot option.

2013-04-05 Thread Tang Chen
. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Reviewed-by: Wen Congyang we...@cn.fujitsu.com Tested-by: Lin Feng linf...@cn.fujitsu.com --- Documentation/kernel-parameters.txt | 11 +++ include/linux/mm.h | 12

  1   2   3   4   5   6   7   8   9   10   >