Re: [RESEND PATCH] mm/hotplug: don't reset pagetype flags for offline

From: Michal Hocko
Date: Tue Mar 12 2019 - 11:57:34 EST


On Tue 12-03-19 16:35:06, Oscar Salvador wrote:
[...]
> One thing I noticed when looking at start_isolate_page_range and
> undo_isolate_page_range functions, is that start_isolate_page_range increments
> the number of isolated pageblocks, while undo_isolate_page_range does the counter
> part.
> Since undo_isolate_page_range is really never called during offlining,
> we leave zone->nr_isolate_pageblock with a stale value.
>
> I __think__ this does not matter much.
> We only get to check whether a zone got isolated pageblocks in
> has_isolate_pageblock(), and this is called from:
>
> free_one_page
> free_pcppages_bulk
> __free_one_page

It forces those into slow(er) path. So it makes a difference.

> With a quick glance, the only difference in has_isolate_pageblock() returning
> true or false, seems to be that those functions perform some extra checks in
> case the zone reports to have isolated pageblocks.
>
> I wonder if we should set nr_isolate_pageblock back to its original value
> before start_isolate_page_range.

Yes. And that would be a fixup to my 2ce13640b3f4.

--
Michal Hocko
SUSE Labs