[PATCH v6 07/15] memory-hotplug: move pgdat_resize_lock into sparse_remove_one_section()

2013-01-09 Thread Tang Chen
In __remove_section(), we locked pgdat_resize_lock when calling sparse_remove_one_section(). This lock will disable irq. But we don't need to lock the whole function. If we do some work to free pagetables in free_section_usemap(), we need to call flush_tlb_all(), which need irq enabled. Otherwise

[PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Tang Chen
From: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} sysfs files are created. But there is no code to remove these files. The patch implements the function to remove them. Note: The code does not free

[PATCH v6 01/15] memory-hotplug: try to offline the memory twice to avoid dependence

2013-01-09 Thread Tang Chen
From: Wen Congyang we...@cn.fujitsu.com memory can't be offlined when CONFIG_MEMCG is selected. For example: there is a memory device on node 1. The address range is [1G, 1.5G). You will find 4 new directories memory8, memory9, memory10, and memory11 under the directory

[PATCH v6 03/15] memory-hotplug: remove redundant codes

2013-01-09 Thread Tang Chen
From: Wen Congyang we...@cn.fujitsu.com offlining memory blocks and checking whether memory blocks are offlined are very similar. This patch introduces a new function to remove redundant codes. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

[PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Tang Chen
Here is the physical memory hot-remove patch-set based on 3.8rc-2. This patch-set aims to implement physical memory hot-removing. The patches can free/remove the following things: - /sys/firmware/memmap/X/{end, start, type} : [PATCH 4/15] - memmap of sparse-vmemmap : [PATCH

[PATCH v6 05/15] memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture

2013-01-09 Thread Tang Chen
From: Wen Congyang we...@cn.fujitsu.com For removing memory, we need to remove page table. But it depends on architecture. So the patch introduce arch_remove_memory() for removing page table. Now it only calls __remove_pages(). Note: __remove_pages() for some archtecuture is not implemented

[PATCH v6 08/15] memory-hotplug: Common APIs to support page tables hot-remove

2013-01-09 Thread Tang Chen
From: Wen Congyang we...@cn.fujitsu.com When memory is removed, the corresponding pagetables should alse be removed. This patch introduces some common APIs to support vmemmap pagetable and x86_64 architecture pagetable removing. All pages of virtual mapping in removed memory cannot be freedi if

[PATCH v6 06/15] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2013-01-09 Thread Tang Chen
From: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com For removing memmap region of sparse-vmemmap which is allocated bootmem, memmap region of sparse-vmemmap needs to be registered by get_page_bootmem(). So the patch searches pages of virtual mapping and registers the pages by

[PATCH v6 02/15] memory-hotplug: check whether all memory blocks are offlined or not when removing memory

2013-01-09 Thread Tang Chen
From: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com We remove the memory like this: 1. lock memory hotplug 2. offline a memory block 3. unlock memory hotplug 4. repeat 1-3 to offline all memory blocks 5. lock memory hotplug 6. remove memory(TODO) 7. unlock memory hotplug All memory blocks

[PATCH v6 09/15] memory-hotplug: remove page table of x86_64 architecture

2013-01-09 Thread Tang Chen
This patch searches a page table about the removed memory, and clear page table for x86_64 architecture. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Jianguo Wu wujian...@huawei.com Signed-off-by: Jiang Liu jiang@huawei.com Signed-off-by: Tang Chen tangc...@cn.fujitsu.com

[PATCH v6 13/15] memory-hotplug: remove sysfs file of node

2013-01-09 Thread Tang Chen
This patch introduces a new function try_offline_node() to remove sysfs file of node when all memory sections of this node are removed. If some memory sections of this node are not removed, this function does nothing. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen

[PATCH v6 10/15] memory-hotplug: remove memmap of sparse-vmemmap

2013-01-09 Thread Tang Chen
This patch introduces a new API vmemmap_free() to free and remove vmemmap pagetables. Since pagetable implements are different, each architecture has to provide its own version of vmemmap_free(), just like vmemmap_populate(). Note: vmemmap_free() are not implemented for ia64, ppc, s390, and

[PATCH v6 12/15] memory-hotplug: memory_hotplug: clear zone when removing the memory

2013-01-09 Thread Tang Chen
From: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com When a memory is added, we update zone's and pgdat's start_pfn and spanned_pages in the function __add_zone(). So we should revert them when the memory is removed. The patch adds a new function __remove_zone() to do this. Signed-off-by:

[PATCH v6 14/15] memory-hotplug: free node_data when a node is offlined

2013-01-09 Thread Tang Chen
From: Wen Congyang we...@cn.fujitsu.com We call hotadd_new_pgdat() to allocate memory to store node_data. So we should free it when removing a node. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Reviewed-by: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memory_hotplug.c | 30

[PATCH v6 11/15] memory-hotplug: Integrated __remove_section() of CONFIG_SPARSEMEM_VMEMMAP.

2013-01-09 Thread Tang Chen
Currently __remove_section for SPARSEMEM_VMEMMAP does nothing. But even if we use SPARSEMEM_VMEMMAP, we can unregister the memory_section. Signed-off-by: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Tang Chen

[PATCH v6 15/15] memory-hotplug: Do not allocate pdgat if it was not freed when offline.

2013-01-09 Thread Tang Chen
Since there is no way to guarentee the address of pgdat/zone is not on stack of any kernel threads or used by other kernel objects without reference counting or other symchronizing method, we cannot reset node_data and free pgdat when offlining a node. Just reset pgdat to 0 and reuse the memory

Re: [PATCH 7/8] mm: use vm_unmapped_area() on powerpc architecture

2013-01-09 Thread Michel Lespinasse
On Wed, Jan 09, 2013 at 02:32:56PM +1100, Benjamin Herrenschmidt wrote: Ok. I think at least you can move that construct: + if (addr SLICE_LOW_TOP) { + slice = GET_LOW_SLICE_INDEX(addr); + addr = (slice + 1) SLICE_LOW_SHIFT; +

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2013-01-09 Thread Glauber Costa
On 12/30/2012 09:58 AM, Wen Congyang wrote: At 12/25/2012 04:35 PM, Glauber Costa Wrote: On 12/24/2012 04:09 PM, Tang Chen wrote: From: Wen Congyang we...@cn.fujitsu.com memory can't be offlined when CONFIG_MEMCG is selected. For example: there is a memory device on node 1. The address range

Re: [PATCH 1/8] mm: use vm_unmapped_area() on parisc architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Update the parisc arch_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse wal...@google.com Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 2/8] mm: use vm_unmapped_area() on alpha architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Update the alpha arch_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse wal...@google.com Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 3/8] mm: use vm_unmapped_area() on frv architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Update the frv arch_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse wal...@google.com Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 4/8] mm: use vm_unmapped_area() on ia64 architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Update the ia64 arch_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse wal...@google.com Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 5/8] mm: use vm_unmapped_area() in hugetlbfs on ia64 architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Update the ia64 hugetlb_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse wal...@google.com Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 6/8] mm: remove free_area_cache use in powerpc architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: As all other architectures have been converted to use vm_unmapped_area(), we are about to retire the free_area_cache. This change simply removes the use of that cache in slice_get_unmapped_area(), which will most certainly have a performance

Re: [PATCH 7/8] mm: use vm_unmapped_area() on powerpc architecture

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Update the powerpc slice_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse wal...@google.com Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 8/8] mm: remove free_area_cache

2013-01-09 Thread Rik van Riel
On 01/08/2013 08:28 PM, Michel Lespinasse wrote: Since all architectures have been converted to use vm_unmapped_area(), there is no remaining use for the free_area_cache. Signed-off-by: Michel Lespinasse wal...@google.com Yay Acked-by: Rik van Riel r...@redhat.com

Re: [PATCH 7/8] mm: use vm_unmapped_area() on powerpc architecture

2013-01-09 Thread Rik van Riel
On 01/09/2013 06:23 AM, Michel Lespinasse wrote: On Wed, Jan 09, 2013 at 02:32:56PM +1100, Benjamin Herrenschmidt wrote: Ok. I think at least you can move that construct: + if (addr SLICE_LOW_TOP) { + slice = GET_LOW_SLICE_INDEX(addr); +

Re: [PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch

2013-01-09 Thread Jimi Xenidis
On Dec 18, 2012, at 10:31 AM, Peter Bergner berg...@vnet.ibm.com wrote: On Tue, 2012-12-18 at 07:28 -0600, Jimi Xenidis wrote: On Dec 17, 2012, at 6:26 PM, Peter Bergner berg...@vnet.ibm.com wrote: Jimi, are you using an old binutils from before my patch that changed the operand order for

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:24 +0800 Tang Chen tangc...@cn.fujitsu.com wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. This patch-set aims to implement physical memory hot-removing. The patches can free/remove the following things: - /sys/firmware/memmap/X/{end,

[PATCH v2] powerpc/mm: eliminate unneeded for_each_memblock

2013-01-09 Thread Cody P Schafer
The only persistent change made by this loop is calling memblock_set_node() once for each memblock, which is not useful (and has no effect) as memblock_set_node() is not called with any memblock-specific parameters. Subsistute a single memblock_set_node(). Signed-off-by: Cody P Schafer

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:28 +0800 Tang Chen tangc...@cn.fujitsu.com wrote: When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} sysfs files are created. But there is no code to remove these files. The patch implements the function to remove them. Note: The code

Re: [PATCH v6 05/15] memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:29 +0800 Tang Chen tangc...@cn.fujitsu.com wrote: For removing memory, we need to remove page table. But it depends on architecture. So the patch introduce arch_remove_memory() for removing page table. Now it only calls __remove_pages(). Note: __remove_pages() for

Re: [PATCH] powerpc: POWER7 optimised memcpy using VMX and enhanced prefetch

2013-01-09 Thread Peter Bergner
On Wed, 2013-01-09 at 16:19 -0600, Jimi Xenidis wrote: I agree, but that means it is impossible for the same .S file can be compiled but -mcpu=e500mc and -mcpu=powerpc? So either these files have to be Book3S versus Book3E --or-- we use a CPP macro to get them right. FWIW, I prefer the latter

Re: [PATCH v6 02/15] memory-hotplug: check whether all memory blocks are offlined or not when removing memory

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:26 +0800 Tang Chen tangc...@cn.fujitsu.com wrote: We remove the memory like this: 1. lock memory hotplug 2. offline a memory block 3. unlock memory hotplug 4. repeat 1-3 to offline all memory blocks 5. lock memory hotplug 6. remove memory(TODO) 7. unlock memory

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:28 +0800 Tang Chen tangc...@cn.fujitsu.com wrote: From: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} sysfs files are created. But there is no code to remove these files. The patch

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Andrew Morton
On Wed, 9 Jan 2013 17:32:24 +0800 Tang Chen tangc...@cn.fujitsu.com wrote: This patch-set aims to implement physical memory hot-removing. As you were on th patch delivery path, all of these patches should have your Signed-off-by:. But some were missing it. I fixed this in my copy of the

[PATCH 1/6][v3] perf/Power7: Use macros to identify perf events

2013-01-09 Thread sukadev
Define and use macros to identify perf events codes. This would make it easier and more readable when these event codes need to be used in more than one place. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- arch/powerpc/perf/power7-pmu.c | 28 1

[PATCH 2/6][v3] perf: Make EVENT_ATTR global

2013-01-09 Thread sukadev
Rename EVENT_ATTR() to PMU_EVENT_ATTR() and make it global so it is available to all architectures. Further to allow architectures flexibility, have PMU_EVENT_ATTR() pass in the variable name as a parameter. Changelog[v3] - [Jiri Olsa] No need to define PMU_EVENT_PTR() Signed-off-by:

[PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries

2013-01-09 Thread sukadev
This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files which would become part of the ABI. Changelog[v3]:

[PATCH 3/6][v3] perf/POWER7: Make generic event translations available in sysfs

2013-01-09 Thread sukadev
Make the generic perf events in POWER7 available via sysfs. $ ls /sys/bus/event_source/devices/cpu/events branch-instructions branch-misses cache-misses cache-references cpu-cycles instructions stalled-cycles-backend

[PATCH 4/6][v3] perf/POWER7: Make some POWER7 events available in sysfs

2013-01-09 Thread sukadev
Make some POWER7-specific perf events available in sysfs. $ /bin/ls -1 /sys/bus/event_source/devices/cpu/events/ branch-instructions branch-misses cache-misses cache-references cpu-cycles instructions PM_BRU_FIN PM_BRU_MPRED

[PATCH 5/6][v3] perf: Create a sysfs entry for Power event format

2013-01-09 Thread sukadev
Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event' which describes the format of a POWER cpu. The format of the event is the same for all POWER cpus at least in (Power6, Power7), so bulk of this change is common in the code common to POWER cpus. This code is based on

Re: [PATCH] Added device tree binding for TDM and TDM phy

2013-01-09 Thread Scott Wood
On 01/09/2013 01:10:24 AM, Singh Sandeep-B37400 wrote: A gentle reminder. Any comments are appreciated. Regards, Sandeep -Original Message- From: Singh Sandeep-B37400 Sent: Wednesday, January 02, 2013 6:55 PM To: devicetree-disc...@lists.ozlabs.org; linuxppc-...@ozlabs.org Cc:

[PATCH 1/6][v3] perf/Power7: Use macros to identify perf events

2013-01-09 Thread sukadev
Define and use macros to identify perf events codes. This would make it easier and more readable when these event codes need to be used in more than one place. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- arch/powerpc/perf/power7-pmu.c | 28 1

[PATCH 2/6][v3] perf: Make EVENT_ATTR global

2013-01-09 Thread sukadev
Rename EVENT_ATTR() to PMU_EVENT_ATTR() and make it global so it is available to all architectures. Further to allow architectures flexibility, have PMU_EVENT_ATTR() pass in the variable name as a parameter. Changelog[v3] - [Jiri Olsa] No need to define PMU_EVENT_PTR() Signed-off-by:

[PATCH 3/6][v3] perf/POWER7: Make generic event translations available in sysfs

2013-01-09 Thread sukadev
Make the generic perf events in POWER7 available via sysfs. $ ls /sys/bus/event_source/devices/cpu/events branch-instructions branch-misses cache-misses cache-references cpu-cycles instructions stalled-cycles-backend

[PATCH 4/6][v3] perf/POWER7: Make some POWER7 events available in sysfs

2013-01-09 Thread sukadev
Make some POWER7-specific perf events available in sysfs. $ /bin/ls -1 /sys/bus/event_source/devices/cpu/events/ branch-instructions branch-misses cache-misses cache-references cpu-cycles instructions PM_BRU_FIN PM_BRU_MPRED

[PATCH 5/6][v3] perf: Create a sysfs entry for Power event format

2013-01-09 Thread sukadev
Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event' which describes the format of a POWER cpu. The format of the event is the same for all POWER cpus at least in (Power6, Power7), so bulk of this change is common in the code common to POWER cpus. This code is based on

[PATCH 1/6][v3] perf/Power7: Use macros to identify perf events

2013-01-09 Thread Sukadev Bhattiprolu
[PATCH 1/6][v3] perf/Power7: Use macros to identify perf events Define and use macros to identify perf events codes. This would make it easier and more readable when these event codes need to be used in more than one place. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com ---

[PATCH 2/6][v3] perf: Make EVENT_ATTR global

2013-01-09 Thread Sukadev Bhattiprolu
[PATCH 2/6][v3] perf: Make EVENT_ATTR global Rename EVENT_ATTR() to PMU_EVENT_ATTR() and make it global so it is available to all architectures. Further to allow architectures flexibility, have PMU_EVENT_ATTR() pass in the variable name as a parameter. Changelog[v3] - [Jiri Olsa] No

[PATCH 3/6][v3] perf/POWER7: Make generic event translations available in sysfs

2013-01-09 Thread Sukadev Bhattiprolu
[PATCH 3/6][v3] perf/POWER7: Make generic event translations available in sysfs Make the generic perf events in POWER7 available via sysfs. $ ls /sys/bus/event_source/devices/cpu/events branch-instructions branch-misses cache-misses cache-references

[PATCH 4/6][v3] perf/POWER7: Make some POWER7 events available in sysfs

2013-01-09 Thread Sukadev Bhattiprolu
[PATCH 4/6][v3] perf/POWER7: Make some POWER7 events available in sysfs Make some POWER7-specific perf events available in sysfs. $ /bin/ls -1 /sys/bus/event_source/devices/cpu/events/ branch-instructions branch-misses cache-misses cache-references

[PATCH 5/6][v3] perf: Create a sysfs entry for Power event format

2013-01-09 Thread Sukadev Bhattiprolu
[PATCH 5/6][v3] perf: Create a sysfs entry for Power event format Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event' which describes the format of a POWER cpu. The format of the event is the same for all POWER cpus at least in (Power6, Power7), so bulk of this change is

[PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries

2013-01-09 Thread Sukadev Bhattiprolu
[PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files

Re: [PATCH v5 01/14] memory-hotplug: try to offline the memory twice to avoid dependence

2013-01-09 Thread Tang Chen
Hi Glauber, On 01/09/2013 11:09 PM, Glauber Costa wrote: We try to make all page_cgroup allocations local to the node they are describing now. If the memory is the first memory onlined in this node, we will allocate it from the other node. For example, node1 has 4 memory blocks: 8-11, and we

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Tang Chen
Hi Andrew, Thank you very much for your pushing. :) On 01/10/2013 06:23 AM, Andrew Morton wrote: This does sound like a significant problem. We should assume that mmecg is available and in use. In patch1, we provide a solution which is not good enough: Iterate twice to offline the memory.

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 07:33 AM, Andrew Morton wrote: On Wed, 9 Jan 2013 17:32:24 +0800 Tang Chentangc...@cn.fujitsu.com wrote: This patch-set aims to implement physical memory hot-removing. As you were on th patch delivery path, all of these patches should have your Signed-off-by:. But

Re: [PATCH v6 05/15] memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 06:50 AM, Andrew Morton wrote: On Wed, 9 Jan 2013 17:32:29 +0800 Tang Chentangc...@cn.fujitsu.com wrote: For removing memory, we need to remove page table. But it depends on architecture. So the patch introduce arch_remove_memory() for removing page table. Now it

[PATCH 6/7] powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers

2013-01-09 Thread Michael Neuling
This is a rewrite so that we don't assume we are using the DABR throughout the code. We now use the arch_hw_breakpoint to store the breakpoint in a generic manner in the thread_struct, rather than storing the raw DABR value. The ptrace GET/SET_DEBUGREG interface currently passes the raw DABR in

Re: [TRIVIAL PATCH 11/26] powerpc: Convert print_symbol to %pSR

2013-01-09 Thread Benjamin Herrenschmidt
On Thu, 2012-12-13 at 11:58 +, Arnd Bergmann wrote: On Wednesday 12 December 2012, Joe Perches wrote: Use the new vsprintf extension to avoid any possible message interleaving. Convert the #ifdef DEBUG block to a single pr_debug. Signed-off-by: Joe Perches j...@perches.com

Re: [RFC PATCH powerpc ] Protect smp_processor_id() in arch_spin_unlock_wait()

2013-01-09 Thread Benjamin Herrenschmidt
On Mon, 2012-11-19 at 14:16 +0800, Li Zhong wrote: This patch tries to disable preemption for using smp_processor_id() in arch_spin_unlock_wait(), to avoid following report: .../... diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index bb7cfec..7a7c31b 100644 ---

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 06:49 AM, Andrew Morton wrote: On Wed, 9 Jan 2013 17:32:28 +0800 Tang Chentangc...@cn.fujitsu.com wrote: When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} sysfs files are created. But there is no code to remove these files. The patch

Re: [PATCH v6 02/15] memory-hotplug: check whether all memory blocks are offlined or not when removing memory

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 07:11 AM, Andrew Morton wrote: On Wed, 9 Jan 2013 17:32:26 +0800 Tang Chentangc...@cn.fujitsu.com wrote: We remove the memory like this: 1. lock memory hotplug 2. offline a memory block 3. unlock memory hotplug 4. repeat 1-3 to offline all memory blocks 5. lock

Re: [PATCH v6 04/15] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2013-01-09 Thread Tang Chen
Hi Andrew, On 01/10/2013 07:19 AM, Andrew Morton wrote: ... + entry = firmware_map_find_entry(start, end - 1, type); + if (!entry) + return -EINVAL; + + firmware_map_remove_entry(entry); ... The above code looks racy. After firmware_map_find_entry() does

[PATCH] powerpc: Make room in exception vector area

2013-01-09 Thread Benjamin Herrenschmidt
The FWNMI region is fixed at 0x7000 and the vector are now overflowing that with some configurations. Fix that by moving some hash management code out of that region as it doesn't need to be that close to the call sites (isn't accessed using conditional branches). Signed-off-by: Benjamin

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Glauber Costa
On 01/10/2013 06:17 AM, Tang Chen wrote: Note: if the memory provided by the memory device is used by the kernel, it can't be offlined. It is not a bug. Right. But how often does this happen in testing? In other words, please provide an overall description of how well memory hot-remove is

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Kamezawa Hiroyuki
(2013/01/10 16:14), Glauber Costa wrote: On 01/10/2013 06:17 AM, Tang Chen wrote: Note: if the memory provided by the memory device is used by the kernel, it can't be offlined. It is not a bug. Right. But how often does this happen in testing? In other words, please provide an overall

Re: [RFC PATCH powerpc ] Protect smp_processor_id() in arch_spin_unlock_wait()

2013-01-09 Thread Li Zhong
On Thu, 2013-01-10 at 17:02 +1100, Benjamin Herrenschmidt wrote: On Mon, 2012-11-19 at 14:16 +0800, Li Zhong wrote: This patch tries to disable preemption for using smp_processor_id() in arch_spin_unlock_wait(), to avoid following report: .../... diff --git

Re: [PATCH v6 00/15] memory-hotplug: hot-remove physical memory

2013-01-09 Thread Glauber Costa
On 01/10/2013 11:31 AM, Kamezawa Hiroyuki wrote: (2013/01/10 16:14), Glauber Costa wrote: On 01/10/2013 06:17 AM, Tang Chen wrote: Note: if the memory provided by the memory device is used by the kernel, it can't be offlined. It is not a bug. Right. But how often does this happen in