From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() Date: Wed, 01 Aug 2012 09:42:22 +0800 Message-ID: <5018897E.4040109@cn.fujitsu.com> References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> <20120731144000.33fd4a0a@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20120731144000.33fd4a0a@thinkpad> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: gerald.schaefer@de.ibm.com 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, Heiko Carstens , linux-kernel@vger.kernel.org, cmetcalf@tilera.com, linux-mm@kvack.org, Yasuaki ISIMATU , paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, cl@linux.com, linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org, liuj97@gmail.com List-Id: linux-acpi@vger.kernel.org QXQgMDcvMzEvMjAxMiAwODo0MCBQTSwgR2VyYWxkIFNjaGFlZmVyIFdyb3RlOgo+IE9uIE1vbiwg MzAgSnVsIDIwMTIgMTg6MzU6MzcgKzA4MDAKPiBXZW4gQ29uZ3lhbmcgPHdlbmN5QGNuLmZ1aml0 c3UuY29tPiB3cm90ZToKPiAKPj4gQXQgMDcvMzAvMjAxMiAwNjoyMyBQTSwgSGVpa28gQ2Fyc3Rl bnMgV3JvdGU6Cj4+PiBPbiBGcmksIEp1bCAyNywgMjAxMiBhdCAwNjozMjoxNVBNICswODAwLCBX ZW4gQ29uZ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X19fX19fX19fX19fX19f XwpMaW51eHBwYy1kZXYgbWFpbGluZyBsaXN0CkxpbnV4cHBjLWRldkBsaXN0cy5vemxhYnMub3Jn Cmh0dHBzOi8vbGlzdHMub3psYWJzLm9yZy9saXN0aW5mby9saW51eHBwYy1kZXY= From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Date: Wed, 01 Aug 2012 01:42:22 +0000 Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() Message-Id: <5018897E.4040109@cn.fujitsu.com> List-Id: References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> <20120731144000.33fd4a0a@thinkpad> In-Reply-To: <20120731144000.33fd4a0a@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: gerald.schaefer@de.ibm.com 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, Heiko Carstens , linux-kernel@vger.kernel.org, cmetcalf@tilera.com, linux-mm@kvack.org, Yasuaki ISIMATU , paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, cl@linux.com, linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org, liuj97@gmail.com At 07/31/2012 08:40 PM, Gerald Schaefer Wrote: > On Mon, 30 Jul 2012 18:35:37 +0800 > Wen Congyang wrote: > >> At 07/30/2012 06:23 PM, Heiko Carstens Wrote: >>> On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: >>>> We don't call __add_pages() directly in the function add_memory() >>>> because some other architecture related things need to be done >>>> before or after calling __add_pages(). So we should introduce >>>> a new function arch_remove_memory() to revert the things >>>> done in arch_add_memory(). >>>> >>>> Note: the function for s390 is not implemented(I don't know how to >>>> implement it for s390). >>> >>> There is no hardware or firmware interface which could trigger a >>> hot memory remove on s390. So there is nothing that needs to be >>> implemented. >> >> Thanks for providing this information. >> >> According to this, arch_remove_memory() for s390 can just return >> -EBUSY. > > Yes, but there is a prototype mismatch for arch_remove_memory() on s390 > and also other architectures (u64 vs. unsigned long). > > arch/s390/mm/init.c:262: error: conflicting types for > ‘arch_remove_memory’ include/linux/memory_hotplug.h:88: error: previous > declaration of ‘arch_remove_memory’ was here > > In memory_hotplug.h you have: > extern int arch_remove_memory(unsigned long start, unsigned long size); > > On all archs other than x86 you have: > int arch_remove_memory(u64 start, u64 size) Thanks for pointing it out. I will fix it. Wen Congyang > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from song.cn.fujitsu.com (unknown [222.73.24.84]) by ozlabs.org (Postfix) with ESMTP id BAF902C0092 for ; Wed, 1 Aug 2012 11:37:24 +1000 (EST) Message-ID: <5018897E.4040109@cn.fujitsu.com> Date: Wed, 01 Aug 2012 09:42:22 +0800 From: Wen Congyang MIME-Version: 1.0 To: gerald.schaefer@de.ibm.com Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> <20120731144000.33fd4a0a@thinkpad> In-Reply-To: <20120731144000.33fd4a0a@thinkpad> Content-Type: text/plain; charset=UTF-8 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, Heiko Carstens , linux-kernel@vger.kernel.org, cmetcalf@tilera.com, linux-mm@kvack.org, Yasuaki ISIMATU , paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, 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: , At 07/31/2012 08:40 PM, Gerald Schaefer Wrote: > On Mon, 30 Jul 2012 18:35:37 +0800 > Wen Congyang wrote: >=20 >> At 07/30/2012 06:23 PM, Heiko Carstens Wrote: >>> On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: >>>> We don't call =5F=5Fadd=5Fpages() directly in the function add=5Fmemor= y() >>>> because some other architecture related things need to be done >>>> before or after calling =5F=5Fadd=5Fpages(). So we should introduce >>>> a new function arch=5Fremove=5Fmemory() to revert the things >>>> done in arch=5Fadd=5Fmemory(). >>>> >>>> Note: the function for s390 is not implemented(I don't know how to >>>> implement it for s390). >>> >>> There is no hardware or firmware interface which could trigger a >>> hot memory remove on s390. So there is nothing that needs to be >>> implemented. >> >> Thanks for providing this information. >> >> According to this, arch=5Fremove=5Fmemory() for s390 can just return >> -EBUSY. >=20 > Yes, but there is a prototype mismatch for arch=5Fremove=5Fmemory() on s3= 90 > and also other architectures (u64 vs. unsigned long). >=20 > arch/s390/mm/init.c:262: error: conflicting types for > =E2=80=98arch=5Fremove=5Fmemory=E2=80=99 include/linux/memory=5Fhotplug.h= :88: error: previous > declaration of =E2=80=98arch=5Fremove=5Fmemory=E2=80=99 was here >=20 > In memory=5Fhotplug.h you have: > extern int arch=5Fremove=5Fmemory(unsigned long start, unsigned long size= ); >=20 > On all archs other than x86 you have: > int arch=5Fremove=5Fmemory(u64 start, u64 size) Thanks for pointing it out. I will fix it. Wen Congyang >=20 > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >=20 = From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx175.postini.com [74.125.245.175]) by kanga.kvack.org (Postfix) with SMTP id A60806B004D for ; Tue, 31 Jul 2012 21:37:57 -0400 (EDT) Message-ID: <5018897E.4040109@cn.fujitsu.com> Date: Wed, 01 Aug 2012 09:42:22 +0800 From: Wen Congyang MIME-Version: 1.0 Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> <20120731144000.33fd4a0a@thinkpad> In-Reply-To: <20120731144000.33fd4a0a@thinkpad> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: gerald.schaefer@de.ibm.com Cc: Heiko Carstens , 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, 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, Yasuaki ISIMATU At 07/31/2012 08:40 PM, Gerald Schaefer Wrote: > On Mon, 30 Jul 2012 18:35:37 +0800 > Wen Congyang wrote: >=20 >> At 07/30/2012 06:23 PM, Heiko Carstens Wrote: >>> On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: >>>> We don't call =5F=5Fadd=5Fpages() directly in the function add=5Fmemor= y() >>>> because some other architecture related things need to be done >>>> before or after calling =5F=5Fadd=5Fpages(). So we should introduce >>>> a new function arch=5Fremove=5Fmemory() to revert the things >>>> done in arch=5Fadd=5Fmemory(). >>>> >>>> Note: the function for s390 is not implemented(I don't know how to >>>> implement it for s390). >>> >>> There is no hardware or firmware interface which could trigger a >>> hot memory remove on s390. So there is nothing that needs to be >>> implemented. >> >> Thanks for providing this information. >> >> According to this, arch=5Fremove=5Fmemory() for s390 can just return >> -EBUSY. >=20 > Yes, but there is a prototype mismatch for arch=5Fremove=5Fmemory() on s3= 90 > and also other architectures (u64 vs. unsigned long). >=20 > arch/s390/mm/init.c:262: error: conflicting types for > =E2=80=98arch=5Fremove=5Fmemory=E2=80=99 include/linux/memory=5Fhotplug.h= :88: error: previous > declaration of =E2=80=98arch=5Fremove=5Fmemory=E2=80=99 was here >=20 > In memory=5Fhotplug.h you have: > extern int arch=5Fremove=5Fmemory(unsigned long start, unsigned long size= ); >=20 > On all archs other than x86 you have: > int arch=5Fremove=5Fmemory(u64 start, u64 size) Thanks for pointing it out. I will fix it. Wen Congyang >=20 > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >=20 = -- 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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753498Ab2HABhm (ORCPT ); Tue, 31 Jul 2012 21:37:42 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:42403 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753439Ab2HABhX convert rfc822-to-8bit (ORCPT ); Tue, 31 Jul 2012 21:37:23 -0400 X-IronPort-AV: E=Sophos;i="4.77,690,1336320000"; d="scan'208";a="5524027" Message-ID: <5018897E.4040109@cn.fujitsu.com> Date: Wed, 01 Aug 2012 09:42:22 +0800 From: Wen Congyang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100413 Fedora/3.0.4-2.fc13 Thunderbird/3.0.4 MIME-Version: 1.0 To: gerald.schaefer@de.ibm.com CC: Heiko Carstens , 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, 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, Yasuaki ISIMATU Subject: Re: [RFC PATCH v5 12/19] memory-hotplug: introduce new function arch_remove_memory() References: <50126B83.3050201@cn.fujitsu.com> <50126E2F.8010301@cn.fujitsu.com> <20120730102305.GB3631@osiris.boeblingen.de.ibm.com> <50166379.4090305@cn.fujitsu.com> <20120731144000.33fd4a0a@thinkpad> In-Reply-To: <20120731144000.33fd4a0a@thinkpad> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/08/01 09:37:49, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/08/01 09:37:54 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At 07/31/2012 08:40 PM, Gerald Schaefer Wrote: > On Mon, 30 Jul 2012 18:35:37 +0800 > Wen Congyang wrote: > >> At 07/30/2012 06:23 PM, Heiko Carstens Wrote: >>> On Fri, Jul 27, 2012 at 06:32:15PM +0800, Wen Congyang wrote: >>>> We don't call __add_pages() directly in the function add_memory() >>>> because some other architecture related things need to be done >>>> before or after calling __add_pages(). So we should introduce >>>> a new function arch_remove_memory() to revert the things >>>> done in arch_add_memory(). >>>> >>>> Note: the function for s390 is not implemented(I don't know how to >>>> implement it for s390). >>> >>> There is no hardware or firmware interface which could trigger a >>> hot memory remove on s390. So there is nothing that needs to be >>> implemented. >> >> Thanks for providing this information. >> >> According to this, arch_remove_memory() for s390 can just return >> -EBUSY. > > Yes, but there is a prototype mismatch for arch_remove_memory() on s390 > and also other architectures (u64 vs. unsigned long). > > arch/s390/mm/init.c:262: error: conflicting types for > ‘arch_remove_memory’ include/linux/memory_hotplug.h:88: error: previous > declaration of ‘arch_remove_memory’ was here > > In memory_hotplug.h you have: > extern int arch_remove_memory(unsigned long start, unsigned long size); > > On all archs other than x86 you have: > int arch_remove_memory(u64 start, u64 size) Thanks for pointing it out. I will fix it. Wen Congyang > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >