From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tang Chen Subject: Re: [PATCH v5 08/14] memory-hotplug: Common APIs to support page tables hot-remove Date: Wed, 26 Dec 2012 11:19:56 +0800 Message-ID: <50DA6CDC.4050101@cn.fujitsu.com> References: <1356350964-13437-1-git-send-email-tangchen@cn.fujitsu.com> <1356350964-13437-9-git-send-email-tangchen@cn.fujitsu.com> <50D96116.1070305@huawei.com> <50DA65B7.2050707@cn.fujitsu.com> <50DA6AC5.4020904@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50DA6AC5.4020904@cn.fujitsu.com> Sender: owner-linux-mm@kvack.org To: Jianguo Wu Cc: akpm@linux-foundation.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, wency@cn.fujitsu.com, hpa@zytor.com, linfeng@cn.fujitsu.com, laijs@cn.fujitsu.com, mgorman@suse.de, yinghai@kernel.org, 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 List-Id: linux-acpi@vger.kernel.org On 12/26/2012 11:11 AM, Tang Chen wrote: > On 12/26/2012 10:49 AM, Tang Chen wrote: >> On 12/25/2012 04:17 PM, Jianguo Wu wrote: >>>> + >>>> +static void __meminit free_pagetable(struct page *page, int order) >>>> +{ >>>> + struct zone *zone; >>>> + bool bootmem = false; >>>> + unsigned long magic; >>>> + >>>> + /* bootmem page has reserved flag */ >>>> + if (PageReserved(page)) { >>>> + __ClearPageReserved(page); >>>> + bootmem = true; >>>> + >>>> + magic = (unsigned long)page->lru.next; >>>> + if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) > > And also, I think we don't need to check MIX_SECTION_INFO since it is > for the pageblock_flags, not the memmap in the section. Oh, no :) We also need to check MIX_SECTION_INFO because we set pgd, pud, pmd pages as MIX_SECTION_INFO in register_page_bootmem_memmap() in patch6. Thanks. :) > > Thanks. :) > >>>> + put_page_bootmem(page); >>> >>> Hi Tang, >>> >>> For removing memmap of sparse-vmemmap, in cpu_has_pse case, if magic >>> == SECTION_INFO, >>> the order will be get_order(PMD_SIZE), so we need a loop here to put >>> all the 512 pages. >>> >> Hi Wu, >> >> Thanks for reminding me that. I truely missed it. >> >> And since in register_page_bootmem_info_section(), a whole memory >> section will be set as SECTION_INFO, I think we don't need to check >> the page magic one by one, just the first one is enough. :) >> >> I will fix it, thanks. :) >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- 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 From: Tang Chen Date: Wed, 26 Dec 2012 03:19:56 +0000 Subject: Re: [PATCH v5 08/14] memory-hotplug: Common APIs to support page tables hot-remove Message-Id: <50DA6CDC.4050101@cn.fujitsu.com> List-Id: References: <1356350964-13437-1-git-send-email-tangchen@cn.fujitsu.com> <1356350964-13437-9-git-send-email-tangchen@cn.fujitsu.com> <50D96116.1070305@huawei.com> <50DA65B7.2050707@cn.fujitsu.com> <50DA6AC5.4020904@cn.fujitsu.com> In-Reply-To: <50DA6AC5.4020904@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jianguo Wu Cc: akpm@linux-foundation.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, wency@cn.fujitsu.com, hpa@zytor.com, linfeng@cn.fujitsu.com, laijs@cn.fujitsu.com, mgorman@suse.de, yinghai@kernel.org, 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 On 12/26/2012 11:11 AM, Tang Chen wrote: > On 12/26/2012 10:49 AM, Tang Chen wrote: >> On 12/25/2012 04:17 PM, Jianguo Wu wrote: >>>> + >>>> +static void __meminit free_pagetable(struct page *page, int order) >>>> +{ >>>> + struct zone *zone; >>>> + bool bootmem = false; >>>> + unsigned long magic; >>>> + >>>> + /* bootmem page has reserved flag */ >>>> + if (PageReserved(page)) { >>>> + __ClearPageReserved(page); >>>> + bootmem = true; >>>> + >>>> + magic = (unsigned long)page->lru.next; >>>> + if (magic = SECTION_INFO || magic = MIX_SECTION_INFO) > > And also, I think we don't need to check MIX_SECTION_INFO since it is > for the pageblock_flags, not the memmap in the section. Oh, no :) We also need to check MIX_SECTION_INFO because we set pgd, pud, pmd pages as MIX_SECTION_INFO in register_page_bootmem_memmap() in patch6. Thanks. :) > > Thanks. :) > >>>> + put_page_bootmem(page); >>> >>> Hi Tang, >>> >>> For removing memmap of sparse-vmemmap, in cpu_has_pse case, if magic >>> = SECTION_INFO, >>> the order will be get_order(PMD_SIZE), so we need a loop here to put >>> all the 512 pages. >>> >> Hi Wu, >> >> Thanks for reminding me that. I truely missed it. >> >> And since in register_page_bootmem_info_section(), a whole memory >> section will be set as SECTION_INFO, I think we don't need to check >> the page magic one by one, just the first one is enough. :) >> >> I will fix it, thanks. :) >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > 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 91C362C008E for ; Wed, 26 Dec 2012 14:20:54 +1100 (EST) Message-ID: <50DA6CDC.4050101@cn.fujitsu.com> Date: Wed, 26 Dec 2012 11:19:56 +0800 From: Tang Chen MIME-Version: 1.0 To: Jianguo Wu Subject: Re: [PATCH v5 08/14] memory-hotplug: Common APIs to support page tables hot-remove References: <1356350964-13437-1-git-send-email-tangchen@cn.fujitsu.com> <1356350964-13437-9-git-send-email-tangchen@cn.fujitsu.com> <50D96116.1070305@huawei.com> <50DA65B7.2050707@cn.fujitsu.com> <50DA6AC5.4020904@cn.fujitsu.com> In-Reply-To: <50DA6AC5.4020904@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Cc: linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-mm@kvack.org, paulus@samba.org, hpa@zytor.com, sparclinux@vger.kernel.org, cl@linux.com, linux-s390@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, isimatu.yasuaki@jp.fujitsu.com, linfeng@cn.fujitsu.com, mgorman@suse.de, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, wency@cn.fujitsu.com, cmetcalf@tilera.com, yinghai@kernel.org, laijs@cn.fujitsu.com, linux-kernel@vger.kernel.org, minchan.kim@gmail.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 12/26/2012 11:11 AM, Tang Chen wrote: > On 12/26/2012 10:49 AM, Tang Chen wrote: >> On 12/25/2012 04:17 PM, Jianguo Wu wrote: >>>> + >>>> +static void __meminit free_pagetable(struct page *page, int order) >>>> +{ >>>> + struct zone *zone; >>>> + bool bootmem = false; >>>> + unsigned long magic; >>>> + >>>> + /* bootmem page has reserved flag */ >>>> + if (PageReserved(page)) { >>>> + __ClearPageReserved(page); >>>> + bootmem = true; >>>> + >>>> + magic = (unsigned long)page->lru.next; >>>> + if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) > > And also, I think we don't need to check MIX_SECTION_INFO since it is > for the pageblock_flags, not the memmap in the section. Oh, no :) We also need to check MIX_SECTION_INFO because we set pgd, pud, pmd pages as MIX_SECTION_INFO in register_page_bootmem_memmap() in patch6. Thanks. :) > > Thanks. :) > >>>> + put_page_bootmem(page); >>> >>> Hi Tang, >>> >>> For removing memmap of sparse-vmemmap, in cpu_has_pse case, if magic >>> == SECTION_INFO, >>> the order will be get_order(PMD_SIZE), so we need a loop here to put >>> all the 512 pages. >>> >> Hi Wu, >> >> Thanks for reminding me that. I truely missed it. >> >> And since in register_page_bootmem_info_section(), a whole memory >> section will be set as SECTION_INFO, I think we don't need to check >> the page magic one by one, just the first one is enough. :) >> >> I will fix it, thanks. :) >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473Ab2LZDU6 (ORCPT ); Tue, 25 Dec 2012 22:20:58 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:49936 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753103Ab2LZDUy (ORCPT ); Tue, 25 Dec 2012 22:20:54 -0500 X-IronPort-AV: E=Sophos;i="4.84,355,1355068800"; d="scan'208";a="6474505" Message-ID: <50DA6CDC.4050101@cn.fujitsu.com> Date: Wed, 26 Dec 2012 11:19:56 +0800 From: Tang Chen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Jianguo Wu CC: akpm@linux-foundation.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, wency@cn.fujitsu.com, hpa@zytor.com, linfeng@cn.fujitsu.com, laijs@cn.fujitsu.com, mgorman@suse.de, yinghai@kernel.org, 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 Subject: Re: [PATCH v5 08/14] memory-hotplug: Common APIs to support page tables hot-remove References: <1356350964-13437-1-git-send-email-tangchen@cn.fujitsu.com> <1356350964-13437-9-git-send-email-tangchen@cn.fujitsu.com> <50D96116.1070305@huawei.com> <50DA65B7.2050707@cn.fujitsu.com> <50DA6AC5.4020904@cn.fujitsu.com> In-Reply-To: <50DA6AC5.4020904@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/12/26 11:20:40, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2012/12/26 11:20:41, Serialize complete at 2012/12/26 11:20:41 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/26/2012 11:11 AM, Tang Chen wrote: > On 12/26/2012 10:49 AM, Tang Chen wrote: >> On 12/25/2012 04:17 PM, Jianguo Wu wrote: >>>> + >>>> +static void __meminit free_pagetable(struct page *page, int order) >>>> +{ >>>> + struct zone *zone; >>>> + bool bootmem = false; >>>> + unsigned long magic; >>>> + >>>> + /* bootmem page has reserved flag */ >>>> + if (PageReserved(page)) { >>>> + __ClearPageReserved(page); >>>> + bootmem = true; >>>> + >>>> + magic = (unsigned long)page->lru.next; >>>> + if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) > > And also, I think we don't need to check MIX_SECTION_INFO since it is > for the pageblock_flags, not the memmap in the section. Oh, no :) We also need to check MIX_SECTION_INFO because we set pgd, pud, pmd pages as MIX_SECTION_INFO in register_page_bootmem_memmap() in patch6. Thanks. :) > > Thanks. :) > >>>> + put_page_bootmem(page); >>> >>> Hi Tang, >>> >>> For removing memmap of sparse-vmemmap, in cpu_has_pse case, if magic >>> == SECTION_INFO, >>> the order will be get_order(PMD_SIZE), so we need a loop here to put >>> all the 512 pages. >>> >> Hi Wu, >> >> Thanks for reminding me that. I truely missed it. >> >> And since in register_page_bootmem_info_section(), a whole memory >> section will be set as SECTION_INFO, I think we don't need to check >> the page magic one by one, just the first one is enough. :) >> >> I will fix it, thanks. :) >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >