From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs Date: Tue, 4 Sep 2012 16:16:34 -0700 Message-ID: <20120904161634.f1f9f693.akpm@linux-foundation.org> References: <1346148027-24468-1-git-send-email-wency@cn.fujitsu.com> <1346148027-24468-9-git-send-email-wency@cn.fujitsu.com> <20120831140623.8d13bd2c.akpm@linux-foundation.org> <5044454E.7070909@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:54902 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932839Ab2IDXQg (ORCPT ); Tue, 4 Sep 2012 19:16:36 -0400 In-Reply-To: <5044454E.7070909@cn.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Wen Congyang 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, kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Christoph Lameter On Mon, 03 Sep 2012 13:51:10 +0800 Wen Congyang wrote: > >> +static void release_firmware_map_entry(struct kobject *kobj) > >> +{ > >> + struct firmware_map_entry *entry = to_memmap_entry(kobj); > >> + struct page *page; > >> + > >> + page = virt_to_page(entry); > >> + if (PageSlab(page) || PageCompound(page)) > > > > That PageCompound() test looks rather odd. Why is this done? > > Liu Jiang and Christoph Lameter discussed how to find slab page > in this mail: > https://lkml.org/lkml/2012/7/6/333. Well, please add a code comment to release_firmware_map_entry() which fully explains these things. I see that Christoph and I agree: "It would be cleaner if memory hotplug had an indicator which allocation mechanism was used and would use the corresponding free action". You didn't respond to this suggestion when he made it, nor when I made it. What are your thoughts on this? From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Tue, 04 Sep 2012 23:16:34 +0000 Subject: Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs Message-Id: <20120904161634.f1f9f693.akpm@linux-foundation.org> List-Id: References: <1346148027-24468-1-git-send-email-wency@cn.fujitsu.com> <1346148027-24468-9-git-send-email-wency@cn.fujitsu.com> <20120831140623.8d13bd2c.akpm@linux-foundation.org> <5044454E.7070909@cn.fujitsu.com> In-Reply-To: <5044454E.7070909@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Wen Congyang 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, kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Christoph Lameter On Mon, 03 Sep 2012 13:51:10 +0800 Wen Congyang wrote: > >> +static void release_firmware_map_entry(struct kobject *kobj) > >> +{ > >> + struct firmware_map_entry *entry = to_memmap_entry(kobj); > >> + struct page *page; > >> + > >> + page = virt_to_page(entry); > >> + if (PageSlab(page) || PageCompound(page)) > > > > That PageCompound() test looks rather odd. Why is this done? > > Liu Jiang and Christoph Lameter discussed how to find slab page > in this mail: > https://lkml.org/lkml/2012/7/6/333. Well, please add a code comment to release_firmware_map_entry() which fully explains these things. I see that Christoph and I agree: "It would be cleaner if memory hotplug had an indicator which allocation mechanism was used and would use the corresponding free action". You didn't respond to this suggestion when he made it, nor when I made it. What are your thoughts on this? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by ozlabs.org (Postfix) with ESMTP id 048AE2C0093 for ; Wed, 5 Sep 2012 09:16:37 +1000 (EST) Date: Tue, 4 Sep 2012 16:16:34 -0700 From: Andrew Morton To: Wen Congyang Subject: Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs Message-Id: <20120904161634.f1f9f693.akpm@linux-foundation.org> In-Reply-To: <5044454E.7070909@cn.fujitsu.com> References: <1346148027-24468-1-git-send-email-wency@cn.fujitsu.com> <1346148027-24468-9-git-send-email-wency@cn.fujitsu.com> <20120831140623.8d13bd2c.akpm@linux-foundation.org> <5044454E.7070909@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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, Christoph Lameter , cl@linux.com, linuxppc-dev@lists.ozlabs.org, liuj97@gmail.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 03 Sep 2012 13:51:10 +0800 Wen Congyang wrote: > >> +static void release_firmware_map_entry(struct kobject *kobj) > >> +{ > >> + struct firmware_map_entry *entry = to_memmap_entry(kobj); > >> + struct page *page; > >> + > >> + page = virt_to_page(entry); > >> + if (PageSlab(page) || PageCompound(page)) > > > > That PageCompound() test looks rather odd. Why is this done? > > Liu Jiang and Christoph Lameter discussed how to find slab page > in this mail: > https://lkml.org/lkml/2012/7/6/333. Well, please add a code comment to release_firmware_map_entry() which fully explains these things. I see that Christoph and I agree: "It would be cleaner if memory hotplug had an indicator which allocation mechanism was used and would use the corresponding free action". You didn't respond to this suggestion when he made it, nor when I made it. What are your thoughts on this? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx198.postini.com [74.125.245.198]) by kanga.kvack.org (Postfix) with SMTP id B9BF56B005D for ; Tue, 4 Sep 2012 19:16:36 -0400 (EDT) Date: Tue, 4 Sep 2012 16:16:34 -0700 From: Andrew Morton Subject: Re: [RFC v8 PATCH 08/20] memory-hotplug: remove /sys/firmware/memmap/X sysfs Message-Id: <20120904161634.f1f9f693.akpm@linux-foundation.org> In-Reply-To: <5044454E.7070909@cn.fujitsu.com> References: <1346148027-24468-1-git-send-email-wency@cn.fujitsu.com> <1346148027-24468-9-git-send-email-wency@cn.fujitsu.com> <20120831140623.8d13bd2c.akpm@linux-foundation.org> <5044454E.7070909@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Wen Congyang 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, kosaki.motohiro@jp.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Christoph Lameter On Mon, 03 Sep 2012 13:51:10 +0800 Wen Congyang wrote: > >> +static void release_firmware_map_entry(struct kobject *kobj) > >> +{ > >> + struct firmware_map_entry *entry = to_memmap_entry(kobj); > >> + struct page *page; > >> + > >> + page = virt_to_page(entry); > >> + if (PageSlab(page) || PageCompound(page)) > > > > That PageCompound() test looks rather odd. Why is this done? > > Liu Jiang and Christoph Lameter discussed how to find slab page > in this mail: > https://lkml.org/lkml/2012/7/6/333. Well, please add a code comment to release_firmware_map_entry() which fully explains these things. I see that Christoph and I agree: "It would be cleaner if memory hotplug had an indicator which allocation mechanism was used and would use the corresponding free action". You didn't respond to this suggestion when he made it, nor when I made it. What are your thoughts on this? -- 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