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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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;
+
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
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
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
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
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
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
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
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
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
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);
+
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
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,
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
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
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
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
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
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
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
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
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:
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]:
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
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
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
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:
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
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:
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
---
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
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
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
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
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
(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
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
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
69 matches
Mail list logo