From: Michal Hocko <mhocko@kernel.org>
To: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com,
akpm@linux-foundation.org, mgorman@techsingularity.net,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, vbabka@suse.cz,
bharata@linux.vnet.ibm.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, dan.j.williams@intel.com,
kirill.shutemov@linux.intel.com, bhe@redhat.com
Subject: Re: [v4 6/6] mm/memory_hotplug: optimize memory hotplug
Date: Mon, 19 Feb 2018 14:42:44 +0100 [thread overview]
Message-ID: <20180219134244.GM21134@dhcp22.suse.cz> (raw)
In-Reply-To: <20180215165920.8570-7-pasha.tatashin@oracle.com>
On Thu 15-02-18 11:59:20, Pavel Tatashin wrote:
[...]
> @@ -260,21 +260,12 @@ static int __meminit __add_section(int nid, unsigned long phys_start_pfn,
> return ret;
>
> /*
> - * Make all the pages reserved so that nobody will stumble over half
> - * initialized state.
> - * FIXME: We also have to associate it with a node because page_to_nid
> - * relies on having page with the proper node.
> + * The first page in every section holds node id, this is because we
> + * will need it in online_pages().
> */
> - for (i = 0; i < PAGES_PER_SECTION; i++) {
> - unsigned long pfn = phys_start_pfn + i;
> - struct page *page;
> - if (!pfn_valid(pfn))
> - continue;
> -
> - page = pfn_to_page(pfn);
> - set_page_node(page, nid);
> - SetPageReserved(page);
> - }
> + page = pfn_to_page(phys_start_pfn);
> + mm_zero_struct_page(page);
> + set_page_node(page, nid);
I really dislike this part. It is just too subtle assumption. We can
safely store the node id into memory_block and push it down the way to
online. Or am I missing something?
Btw. the rest of the series seem good as is so I would go with it and
keep this last patch aparat and make sure to do it properly rather than
add more hacks.
> if (!want_memblock)
> return 0;
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2018-02-19 13:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 16:59 [v4 0/6] optimize memory hotplug Pavel Tatashin
2018-02-15 16:59 ` [v4 1/6] mm/memory_hotplug: enforce block size aligned range check Pavel Tatashin
2018-02-15 16:59 ` [v4 2/6] x86/mm/memory_hotplug: determine block size based on the end of boot memory Pavel Tatashin
2018-02-15 16:59 ` [v4 3/6] mm: uninitialized struct page poisoning sanity checking Pavel Tatashin
2018-02-16 9:23 ` Ingo Molnar
2018-02-16 13:10 ` Pavel Tatashin
2018-02-15 16:59 ` [v4 4/6] mm/memory_hotplug: optimize probe routine Pavel Tatashin
2018-02-16 9:13 ` Ingo Molnar
2018-02-16 13:07 ` Pavel Tatashin
2018-02-19 13:23 ` Michal Hocko
2018-02-15 16:59 ` [v4 5/6] mm/memory_hotplug: don't read nid from struct page during hotplug Pavel Tatashin
2018-02-16 9:19 ` Ingo Molnar
2018-02-16 13:09 ` Pavel Tatashin
2018-02-19 13:37 ` Michal Hocko
2018-02-15 16:59 ` [v4 6/6] mm/memory_hotplug: optimize memory hotplug Pavel Tatashin
2018-02-16 9:30 ` Ingo Molnar
2018-02-16 13:12 ` Pavel Tatashin
2018-02-19 13:42 ` Michal Hocko [this message]
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=20180219134244.GM21134@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=bhe@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=daniel.m.jordan@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mingo@redhat.com \
--cc=pasha.tatashin@oracle.com \
--cc=steven.sistare@oracle.com \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=x86@kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).