From: Michal Hocko <mhocko@kernel.org>
To: Oscar Salvador <osalvador@suse.de>
Cc: Qian Cai <cai@lca.pw>,
akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hotplug: fix offline undo_isolate_page_range()
Date: Wed, 13 Mar 2019 09:01:05 +0100 [thread overview]
Message-ID: <20190313080105.GG5721@dhcp22.suse.cz> (raw)
In-Reply-To: <20190313075212.wc3pbwixx3ppwxua@d104.suse.de>
On Wed 13-03-19 08:52:16, Oscar Salvador wrote:
> On Tue, Mar 12, 2019 at 09:42:16PM -0400, Qian Cai wrote:
> > +
> > + /*
> > + * Onlining will reset pagetype flags and makes migrate type
> > + * MOVABLE, so just need to decrease the number of isolated
> > + * pageblocks zone counter here.
> > + */
> > + for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
> > + int i;
> > +
> > + for (i = 0; i < pageblock_nr_pages; i++)
> > + if (pfn_valid_within(pfn + i)) {
> > + zone->nr_isolate_pageblock--;
> > + break;
> > + }
> > + }
> > +
>
> I do not really like this.
>
> I first thought about saving the value before entering start_isolate_page_range,
> but that could race with alloc_contig_range for instance.
Yup. We need to take the zone lock.
> So, why not make start_isolate_page_range to return the actual number of isolated
> pageblocks?
That makes more sense indeed.
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2019-03-13 8:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 1:42 Qian Cai
2019-03-13 7:52 ` Oscar Salvador
2019-03-13 8:01 ` 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=20190313080105.GG5721@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=vbabka@suse.cz \
/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