Re: [PATCH 4/4] memory-hotplug: auto offline page_cgroup when onlining memory block failed

2012-09-27 Thread Ni zhan Chen
On 09/27/2012 01:45 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang When a memory block is onlined, we will try allocate memory on that node to store page_cgroup. If onlining the memory block failed, we don't offline the page cgroup, and we have no chance to offline this page cgroup unless

Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-27 Thread Ni zhan Chen
On 09/27/2012 02:47 PM, Lai Jiangshan wrote: The __add_zone() maybe call sleep-able init_currently_empty_zone() to init wait_table, But this function also modifies the zone_start_pfn without any lock. It is bugy. So we move this modification out, and we ensure the modification of

Re: [PATCH 1/3] memory_hotplug: fix stale node_states[N_NORMAL_MEMORY]

2012-09-27 Thread Ni zhan Chen
On 09/27/2012 02:47 PM, Lai Jiangshan wrote: Currently memory_hotplug only manages the node_states[N_HIGH_MEMORY], it forgets to manage node_states[N_NORMAL_MEMORY]. it causes node_states[N_NORMAL_MEMORY] becomes stale. We add check_nodemasks_changes_online() and

Re: [PATCH 0/3] memory_hotplug: fix memory hotplug bug

2012-09-27 Thread Ni zhan Chen
On 09/27/2012 02:47 PM, Lai Jiangshan wrote: We found 3 bug while we test and develop memory hotplug. PATCH1~2: the old code does not handle node_states[N_NORMAL_MEMORY] correctly, it corrupts the memory. PATCH3: move the modification of zone_start_pfn into corresponding lock. please fully

Re: [RFC v9 PATCH 01/21] memory-hotplug: rename remove_memory() to offline_memory()/offline_pages()

2012-09-27 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Yasuaki Ishimatsu remove_memory() only try to offline pages. It is called in two cases: 1. hot remove a memory device 2. echo offline >/sys/devices/system/memory/memoryXX/state In the 1st case, we should also change memory block's

Re: [RFC v9 PATCH 03/21] memory-hotplug: store the node id in acpi_memory_device

2012-09-27 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang The memory device has only one node id. Store the node id when enable the memory device, and we can reuse it when removing the memory device. one question: if use numa emulation, memory device will associated to one node

Re: [RFC v9 PATCH 05/21] memory-hotplug: check whether memory is present or not

2012-09-27 Thread Ni zhan Chen
On 09/11/2012 10:24 AM, Yasuaki Ishimatsu wrote: Hi Wen, 2012/09/11 11:15, Wen Congyang wrote: Hi, ishimatsu At 09/05/2012 05:25 PM, we...@cn.fujitsu.com Wrote: From: Yasuaki Ishimatsu If system supports memory hot-remove, online_pages() may online removed pages. So online_pages() need to

Re: [RFC v9 PATCH 04/21] memory-hotplug: offline and remove memory when removing the memory device

2012-09-27 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Yasuaki Ishimatsu We should offline and remove memory when removing the memory device. The memory device can be removed by 2 ways: 1. send eject request by SCI 2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject In the 1st case,

Re: [PATCH 1/4] memory-hotplug: add memory_block_release

2012-09-28 Thread Ni zhan Chen
On 09/28/2012 11:45 AM, Yasuaki Ishimatsu wrote: Hi Kosaki-san, 2012/09/28 10:35, KOSAKI Motohiro wrote: On Thu, Sep 27, 2012 at 8:24 PM, Yasuaki Ishimatsu wrote: Hi Chen, 2012/09/27 19:20, Ni zhan Chen wrote: Hi Congyang, 2012/9/27 From: Yasuaki Ishimatsu When calling

Re: [PATCH 1/4] memory-hotplug: add memory_block_release

2012-09-28 Thread Ni zhan Chen
On 09/28/2012 11:45 AM, Yasuaki Ishimatsu wrote: Hi Kosaki-san, 2012/09/28 10:35, KOSAKI Motohiro wrote: On Thu, Sep 27, 2012 at 8:24 PM, Yasuaki Ishimatsu wrote: Hi Chen, 2012/09/27 19:20, Ni zhan Chen wrote: Hi Congyang, 2012/9/27 From: Yasuaki Ishimatsu When calling

Re: [PATCH 3/3] memory_hotplug: Don't modify the zone_start_pfn outside of zone_span_writelock()

2012-09-28 Thread Ni zhan Chen
On 09/28/2012 03:29 PM, Lai Jiangshan wrote: Hi, Chen, On 09/27/2012 09:19 PM, Ni zhan Chen wrote: On 09/27/2012 02:47 PM, Lai Jiangshan wrote: The __add_zone() maybe call sleep-able init_currently_empty_zone() to init wait_table, But this function also modifies the zone_start_pfn without

Re: [RFC v9 PATCH 13/21] memory-hotplug: check page type in get_page_bootmem

2012-09-28 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Yasuaki Ishimatsu The function get_page_bootmem() may be called more than one time to the same page. There is no need to set page's type, private if the function is not the first time called to the page. Note: the patch is just

Re: [PATCH 0/4] bugfix for memory hotplug

2012-09-28 Thread Ni zhan Chen
On 09/27/2012 01:45 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang Wen Congyang (2): memory-hotplug: clear hwpoisoned flag when onlining pages memory-hotplug: auto offline page_cgroup when onlining memory block failed Again, you should explain these two patches are the new

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-28 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang This patch series aims to support physical memory hot-remove. The patches can free/remove the following things: - acpi_memory_info : [RFC PATCH 4/19] - /sys/firmware/memmap/X/{end, start,

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-09-29 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang This patch series aims to support physical memory hot-remove. The patches can free/remove the following things: - acpi_memory_info : [RFC PATCH 4/19] - /sys/firmware/memmap/X/{end, start,

Re: [RFC v9 PATCH 00/21] memory-hotplug: hot-remove physical memory

2012-10-01 Thread Ni zhan Chen
On 10/01/2012 12:44 PM, Yasuaki Ishimatsu wrote: Hi Chen, 2012/09/29 17:19, Ni zhan Chen wrote: On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang This patch series aims to support physical memory hot-remove. The patches can free/remove the following things

Re: [RFC v9 PATCH 06/21] memory-hotplug: export the function acpi_bus_remove()

2012-10-01 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Wen Congyang The function acpi_bus_remove() can remove a acpi device from acpi device. IIUC, s/acpi device/acpi bus When a acpi device is removed, we need to call this function to remove the acpi device from acpi bus. So export

Re: [RFC v9 PATCH 16/21] memory-hotplug: free memmap of sparse-vmemmap

2012-10-01 Thread Ni zhan Chen
On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Yasuaki Ishimatsu All pages of virtual mapping in removed memory cannot be freed, since some pages used as PGD/PUD includes not only removed memory but also other memory. So the patch checks whether page can be freed or not. How to

<    1   2