From: Xishi Qiu <qiuxishi@huawei.com> To: Maciej Bielski <m.bielski@virtualopensystems.com> Cc: <scott.branden@broadcom.com>, <will.deacon@arm.com>, <ar@linux.vnet.ibm.com>, <tech@virtualopensystems.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: Re: [RFC PATCH] Memory hotplug support for arm64 platform Date: Thu, 15 Dec 2016 14:40:05 +0800 [thread overview] Message-ID: <58523AC5.10800@huawei.com> (raw) In-Reply-To: <58523598.3080902@huawei.com> On 2016/12/15 14:18, Xishi Qiu wrote: > On 2016/12/14 20:16, Maciej Bielski wrote: > >> >> >> -#ifdef CONFIG_MEMORY_HOTREMOVE >> -int arch_remove_memory(u64 start, u64 size) >> -{ >> - unsigned long start_pfn = start >> PAGE_SHIFT; >> - unsigned long nr_pages = size >> PAGE_SHIFT; >> - struct zone *zone; >> - int ret; >> + SetPageReserved(pfn_to_page(pfn)); >> + } > > Hi Maciej, > > Why we need to set reserved here? > I think the new pages are already reserved in __add_zone() -> memmap_init_zone(), right? > Hi Maciej, The reason is as follows, right? It's because that in memmap_init_zone() -> early_pfn_valid(), the new page is still invalid, so we need to init it after memblock_clear_nomap() So why not use __init_single_page() and set_pageblock_migratetype()? > Thanks, > Xishi Qiu >
WARNING: multiple messages have this Message-ID (diff)
From: qiuxishi@huawei.com (Xishi Qiu) To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH] Memory hotplug support for arm64 platform Date: Thu, 15 Dec 2016 14:40:05 +0800 [thread overview] Message-ID: <58523AC5.10800@huawei.com> (raw) In-Reply-To: <58523598.3080902@huawei.com> On 2016/12/15 14:18, Xishi Qiu wrote: > On 2016/12/14 20:16, Maciej Bielski wrote: > >> >> >> -#ifdef CONFIG_MEMORY_HOTREMOVE >> -int arch_remove_memory(u64 start, u64 size) >> -{ >> - unsigned long start_pfn = start >> PAGE_SHIFT; >> - unsigned long nr_pages = size >> PAGE_SHIFT; >> - struct zone *zone; >> - int ret; >> + SetPageReserved(pfn_to_page(pfn)); >> + } > > Hi Maciej, > > Why we need to set reserved here? > I think the new pages are already reserved in __add_zone() -> memmap_init_zone(), right? > Hi Maciej, The reason is as follows, right? It's because that in memmap_init_zone() -> early_pfn_valid(), the new page is still invalid, so we need to init it after memblock_clear_nomap() So why not use __init_single_page() and set_pageblock_migratetype()? > Thanks, > Xishi Qiu >
next prev parent reply other threads:[~2016-12-15 6:41 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-14 12:16 [RFC PATCH] Memory hotplug support for arm64 platform Maciej Bielski 2016-12-14 12:16 ` Maciej Bielski 2016-12-15 6:18 ` Xishi Qiu 2016-12-15 6:18 ` Xishi Qiu 2016-12-15 6:40 ` Xishi Qiu [this message] 2016-12-15 6:40 ` Xishi Qiu 2016-12-15 18:31 ` Andrea Reale 2016-12-15 18:31 ` Andrea Reale 2016-12-16 1:31 ` Xishi Qiu 2016-12-16 1:31 ` Xishi Qiu 2016-12-20 19:12 ` Scott Branden 2016-12-20 19:12 ` Scott Branden 2016-12-21 9:44 ` Maciej Bielski 2016-12-21 9:44 ` Maciej Bielski 2016-12-22 1:20 ` Scott Branden 2016-12-22 1:20 ` Scott Branden 2017-02-06 11:17 ` Andrea Reale 2017-02-06 11:17 ` Andrea Reale 2017-02-08 20:08 ` Scott Branden 2017-02-08 20:08 ` Scott Branden 2017-03-30 0:40 ` Florian Fainelli 2017-03-30 0:40 ` Florian Fainelli 2017-03-31 14:16 ` Andrea Reale 2017-03-31 14:16 ` Andrea Reale
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=58523AC5.10800@huawei.com \ --to=qiuxishi@huawei.com \ --cc=ar@linux.vnet.ibm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=m.bielski@virtualopensystems.com \ --cc=scott.branden@broadcom.com \ --cc=tech@virtualopensystems.com \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.