From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ni zhan Chen Date: Fri, 28 Sep 2012 03:21:37 +0000 Subject: Re: [RFC v9 PATCH 03/21] memory-hotplug: store the node id in acpi_memory_device Message-Id: <506517C1.7050909@gmail.com> List-Id: References: <1346837155-534-1-git-send-email-wency@cn.fujitsu.com> <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> In-Reply-To: <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: wency@cn.fujitsu.com Cc: x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com, sparclinux@vger.kernel.org, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com On 09/05/2012 05:25 PM, wency@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 or ...? > > CC: David Rientjes > CC: Jiang Liu > CC: Len Brown > CC: Benjamin Herrenschmidt > CC: Paul Mackerras > CC: Christoph Lameter > Cc: Minchan Kim > CC: Andrew Morton > CC: KOSAKI Motohiro > CC: Yasuaki Ishimatsu > Signed-off-by: Wen Congyang > Reviewed-by: Yasuaki Ishimatsu > --- > drivers/acpi/acpi_memhotplug.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 2a7beac..7873832 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -83,6 +83,7 @@ struct acpi_memory_info { > struct acpi_memory_device { > struct acpi_device * device; > unsigned int state; /* State of the memory device */ > + int nid; > struct list_head res_list; > }; > > @@ -256,6 +257,9 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > info->enabled = 1; > num_enabled++; > } > + > + mem_device->nid = node; > + > if (!num_enabled) { > printk(KERN_ERR PREFIX "add_memory failed\n"); > mem_device->state = MEMORY_INVALID_STATE; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ni zhan Chen Subject: Re: [RFC v9 PATCH 03/21] memory-hotplug: store the node id in acpi_memory_device Date: Fri, 28 Sep 2012 11:21:37 +0800 Message-ID: <506517C1.7050909@gmail.com> References: <1346837155-534-1-git-send-email-wency@cn.fujitsu.com> <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> Sender: linux-ia64-owner@vger.kernel.org To: wency@cn.fujitsu.com Cc: x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com, sparclinux@vger.kernel.org, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com List-Id: linux-acpi@vger.kernel.org On 09/05/2012 05:25 PM, wency@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 or ...? > > CC: David Rientjes > CC: Jiang Liu > CC: Len Brown > CC: Benjamin Herrenschmidt > CC: Paul Mackerras > CC: Christoph Lameter > Cc: Minchan Kim > CC: Andrew Morton > CC: KOSAKI Motohiro > CC: Yasuaki Ishimatsu > Signed-off-by: Wen Congyang > Reviewed-by: Yasuaki Ishimatsu > --- > drivers/acpi/acpi_memhotplug.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 2a7beac..7873832 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -83,6 +83,7 @@ struct acpi_memory_info { > struct acpi_memory_device { > struct acpi_device * device; > unsigned int state; /* State of the memory device */ > + int nid; > struct list_head res_list; > }; > > @@ -256,6 +257,9 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > info->enabled = 1; > num_enabled++; > } > + > + mem_device->nid = node; > + > if (!num_enabled) { > printk(KERN_ERR PREFIX "add_memory failed\n"); > mem_device->state = MEMORY_INVALID_STATE; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx146.postini.com [74.125.245.146]) by kanga.kvack.org (Postfix) with SMTP id 875946B005D for ; Thu, 27 Sep 2012 23:21:49 -0400 (EDT) Received: by obcva7 with SMTP id va7so3141774obc.14 for ; Thu, 27 Sep 2012 20:21:48 -0700 (PDT) Message-ID: <506517C1.7050909@gmail.com> Date: Fri, 28 Sep 2012 11:21:37 +0800 From: Ni zhan Chen MIME-Version: 1.0 Subject: Re: [RFC v9 PATCH 03/21] memory-hotplug: store the node id in acpi_memory_device References: <1346837155-534-1-git-send-email-wency@cn.fujitsu.com> <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> In-Reply-To: <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: wency@cn.fujitsu.com Cc: x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com, sparclinux@vger.kernel.org, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com On 09/05/2012 05:25 PM, wency@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 or ...? > > CC: David Rientjes > CC: Jiang Liu > CC: Len Brown > CC: Benjamin Herrenschmidt > CC: Paul Mackerras > CC: Christoph Lameter > Cc: Minchan Kim > CC: Andrew Morton > CC: KOSAKI Motohiro > CC: Yasuaki Ishimatsu > Signed-off-by: Wen Congyang > Reviewed-by: Yasuaki Ishimatsu > --- > drivers/acpi/acpi_memhotplug.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 2a7beac..7873832 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -83,6 +83,7 @@ struct acpi_memory_info { > struct acpi_memory_device { > struct acpi_device * device; > unsigned int state; /* State of the memory device */ > + int nid; > struct list_head res_list; > }; > > @@ -256,6 +257,9 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > info->enabled = 1; > num_enabled++; > } > + > + mem_device->nid = node; > + > if (!num_enabled) { > printk(KERN_ERR PREFIX "add_memory failed\n"); > mem_device->state = MEMORY_INVALID_STATE; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 12E562C00BD for ; Fri, 28 Sep 2012 13:21:51 +1000 (EST) Received: by obblz20 with SMTP id lz20so2500926obb.38 for ; Thu, 27 Sep 2012 20:21:48 -0700 (PDT) Message-ID: <506517C1.7050909@gmail.com> Date: Fri, 28 Sep 2012 11:21:37 +0800 From: Ni zhan Chen MIME-Version: 1.0 To: wency@cn.fujitsu.com Subject: Re: [RFC v9 PATCH 03/21] memory-hotplug: store the node id in acpi_memory_device References: <1346837155-534-1-git-send-email-wency@cn.fujitsu.com> <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> In-Reply-To: <1346837155-534-4-git-send-email-wency@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, len.brown@intel.com, linux-acpi@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, cmetcalf@tilera.com, linux-mm@kvack.org, isimatu.yasuaki@jp.fujitsu.com, paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, sparclinux@vger.kernel.org, cl@linux.com, linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org, liuj97@gmail.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 09/05/2012 05:25 PM, wency@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 or ...? > > CC: David Rientjes > CC: Jiang Liu > CC: Len Brown > CC: Benjamin Herrenschmidt > CC: Paul Mackerras > CC: Christoph Lameter > Cc: Minchan Kim > CC: Andrew Morton > CC: KOSAKI Motohiro > CC: Yasuaki Ishimatsu > Signed-off-by: Wen Congyang > Reviewed-by: Yasuaki Ishimatsu > --- > drivers/acpi/acpi_memhotplug.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 2a7beac..7873832 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -83,6 +83,7 @@ struct acpi_memory_info { > struct acpi_memory_device { > struct acpi_device * device; > unsigned int state; /* State of the memory device */ > + int nid; > struct list_head res_list; > }; > > @@ -256,6 +257,9 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > info->enabled = 1; > num_enabled++; > } > + > + mem_device->nid = node; > + > if (!num_enabled) { > printk(KERN_ERR PREFIX "add_memory failed\n"); > mem_device->state = MEMORY_INVALID_STATE;