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

2013-01-31 Thread Tang Chen
Hi Simon, On 02/01/2013 11:06 AM, Simon Jeons wrote: How can distinguish map and use? I mean how can confirm memory is used by kernel instead of map? If the page is free, for example, it is in the buddy system, it is not in use. Even if it is direct mapped by kernel, the kernel logic should

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

2013-01-31 Thread Simon Jeons
Hi Tang, On Fri, 2013-02-01 at 10:42 +0800, Tang Chen wrote: I confuse! > Hi Simon, > > On 02/01/2013 10:17 AM, Simon Jeons wrote: > >> For example: > >> > >> 64TB, what ever > >> xxxTB, what ever > >> logic address space: > >> |_kernel_

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

2013-01-31 Thread Tang Chen
Hi Simon, On 02/01/2013 10:17 AM, Simon Jeons wrote: For example: 64TB, what ever xxxTB, what ever logic address space: |_kernel___|_user_| \ \ / /

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

2013-01-31 Thread Jianguo Wu
On 2013/2/1 10:06, Simon Jeons wrote: > Hi Jianguo, > On Fri, 2013-02-01 at 09:57 +0800, Jianguo Wu wrote: >> On 2013/2/1 9:36, Simon Jeons wrote: >> >>> On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: On 2013/1/31 18:38, Simon Jeons wrote: > Hi Tang, > On Thu, 2013-01-31 at

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

2013-01-31 Thread Simon Jeons
Hi Tang, On Fri, 2013-02-01 at 09:57 +0800, Tang Chen wrote: > On 02/01/2013 09:36 AM, Simon Jeons wrote: > > On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: > >>> > >>> So if config NUMA, kernel memory will not be linear mapping anymore? For > >>> example, > >>> > >>> Node 0 Node 1 > >>> > >

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

2013-01-31 Thread Simon Jeons
Hi Jianguo, On Fri, 2013-02-01 at 09:57 +0800, Jianguo Wu wrote: > On 2013/2/1 9:36, Simon Jeons wrote: > > > On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: > >> On 2013/1/31 18:38, Simon Jeons wrote: > >> > >>> Hi Tang, > >>> On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: > Hi Sim

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

2013-01-31 Thread Jianguo Wu
On 2013/2/1 9:36, Simon Jeons wrote: > On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: >> On 2013/1/31 18:38, Simon Jeons wrote: >> >>> Hi Tang, >>> On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: Hi Simon, On 01/31/2013 04:48 PM, Simon Jeons wrote: > Hi Tang, > On

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

2013-01-31 Thread Tang Chen
On 02/01/2013 09:36 AM, Simon Jeons wrote: On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: So if config NUMA, kernel memory will not be linear mapping anymore? For example, Node 0 Node 1 0 ~ 10G 11G~14G It has nothing to do with linear mapping, I think. kernel memory only at Node 0

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

2013-01-31 Thread Simon Jeons
On Fri, 2013-02-01 at 09:32 +0800, Jianguo Wu wrote: > On 2013/1/31 18:38, Simon Jeons wrote: > > > Hi Tang, > > On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: > >> Hi Simon, > >> > >> On 01/31/2013 04:48 PM, Simon Jeons wrote: > >>> Hi Tang, > >>> On Thu, 2013-01-31 at 15:10 +0800, Tang Chen

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

2013-01-31 Thread Jianguo Wu
On 2013/1/31 18:38, Simon Jeons wrote: > Hi Tang, > On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: >> Hi Simon, >> >> On 01/31/2013 04:48 PM, Simon Jeons wrote: >>> Hi Tang, >>> On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: >>> >>> 1. IIUC, there is a button on machine which supports ho

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

2013-01-31 Thread Simon Jeons
Hi Tang, On Thu, 2013-01-31 at 17:44 +0800, Tang Chen wrote: > Hi Simon, > > On 01/31/2013 04:48 PM, Simon Jeons wrote: > > Hi Tang, > > On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: > > > > 1. IIUC, there is a button on machine which supports hot-remove memory, > > then what's the differenc

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

2013-01-31 Thread Tang Chen
Hi Simon, On 01/31/2013 04:48 PM, Simon Jeons wrote: Hi Tang, On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: 1. IIUC, there is a button on machine which supports hot-remove memory, then what's the difference between press button and echo to /sys? No important difference, I think. Since I

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

2013-01-31 Thread Simon Jeons
Hi Tang, On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: 1. IIUC, there is a button on machine which supports hot-remove memory, then what's the difference between press button and echo to /sys? 2. Since kernel memory is linear mapping(I mean direct mapping part), why can't put kernel direct m

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

2013-01-31 Thread Simon Jeons
Hi Tang, On Thu, 2013-01-31 at 15:10 +0800, Tang Chen wrote: > On 01/31/2013 02:19 PM, Simon Jeons wrote: > > Hi Tang, > > On Thu, 2013-01-31 at 11:31 +0800, Tang Chen wrote: > >> Hi Simon, > >> > >> Please see below. :) > >> > >> On 01/31/2013 09:22 AM, Simon Jeons wrote: > >>> > >>> Sorry, I stil

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

2013-01-30 Thread Tang Chen
On 01/31/2013 02:19 PM, Simon Jeons wrote: Hi Tang, On Thu, 2013-01-31 at 11:31 +0800, Tang Chen wrote: Hi Simon, Please see below. :) On 01/31/2013 09:22 AM, Simon Jeons wrote: Sorry, I still confuse. :( update node_states[N_NORMAL_MEMORY] to node_states[N_MEMORY] or node_states[N_NORMAL_ME

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

2013-01-30 Thread Simon Jeons
Hi Tang, On Thu, 2013-01-31 at 11:31 +0800, Tang Chen wrote: > Hi Simon, > > Please see below. :) > > On 01/31/2013 09:22 AM, Simon Jeons wrote: > > > > Sorry, I still confuse. :( > > update node_states[N_NORMAL_MEMORY] to node_states[N_MEMORY] or > > node_states[N_NORMAL_MEMOR] present 0...ZONE_

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

2013-01-30 Thread Tang Chen
Hi Simon, Please see below. :) On 01/31/2013 09:22 AM, Simon Jeons wrote: Sorry, I still confuse. :( update node_states[N_NORMAL_MEMORY] to node_states[N_MEMORY] or node_states[N_NORMAL_MEMOR] present 0...ZONE_MOVABLE? node_states is what? node_states[N_NORMAL_MEMOR] or node_states[N_MEMORY]?

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

2013-01-30 Thread Simon Jeons
Hi Tang, On Wed, 2013-01-30 at 18:15 +0800, Tang Chen wrote: > Hi Simon, > > Please see below. :) > > On 01/29/2013 08:52 PM, Simon Jeons wrote: > > Hi Tang, > > > > On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: > >> Here is the physical memory hot-remove patch-set based on 3.8rc-2. > > > >

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

2013-01-30 Thread Tang Chen
On 01/30/2013 06:15 PM, Tang Chen wrote: Hi Simon, Please see below. :) On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Some questions ask you, not has relationship wi

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

2013-01-30 Thread Tang Chen
Hi Simon, Please see below. :) On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Some questions ask you, not has relationship with this patchset, but is memory hotplug st

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

2013-01-29 Thread Tang Chen
On 01/30/2013 10:48 AM, Simon Jeons wrote: On Wed, 2013-01-30 at 10:32 +0800, Tang Chen wrote: On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Hi Simon, I'll summarize

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

2013-01-29 Thread Simon Jeons
On Wed, 2013-01-30 at 10:32 +0800, Tang Chen wrote: > On 01/29/2013 08:52 PM, Simon Jeons wrote: > > Hi Tang, > > > > On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: > >> Here is the physical memory hot-remove patch-set based on 3.8rc-2. > > Hi Simon, > > I'll summarize all the info and answe

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

2013-01-29 Thread Tang Chen
On 01/29/2013 08:52 PM, Simon Jeons wrote: Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: Here is the physical memory hot-remove patch-set based on 3.8rc-2. Hi Simon, I'll summarize all the info and answer you later. :) Thanks for asking. :) Some questions ask you, not has

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

2013-01-29 Thread Simon Jeons
Hi Tang, On Wed, 2013-01-09 at 17:32 +0800, Tang Chen wrote: > Here is the physical memory hot-remove patch-set based on 3.8rc-2. Some questions ask you, not has relationship with this patchset, but is memory hotplug stuff. 1. In function node_states_check_changes_online: comments: * If we don'

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

2013-01-10 Thread Kamezawa Hiroyuki
(2013/01/10 17:36), Glauber Costa wrote: BTW, shrink_slab() is now node/zone aware ? If not, fixing that first will be better direction I guess. It is not upstream, but there are patches for this that I am already using in my private tree. Oh, I see. If it's merged, it's worth add "shrink_

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

2013-01-10 Thread Glauber Costa
> If it's configure as ZONE_NORMAL, you need to pray for offlining memory. > > AFAIK, IBM's ppc? has 16MB section size. So, some of sections can be > offlined > even if they are configured as ZONE_NORMAL. For them, placement of offlined > memory is not important because it's virtualized by LPAR,

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

2013-01-10 Thread Kamezawa Hiroyuki
(2013/01/10 16:55), Glauber Costa wrote: 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.

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 d

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 descri

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

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 Chen 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.

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. 1

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 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 patches. I suspect this pa

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 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, start, type} : [

[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