Re: [PATCH] mm/page_alloc: return 0 in case this node has no page within the zone
From: Michal Hocko
Date: Wed Feb 08 2017 - 09:55:01 EST
On Wed 08-02-17 22:05:18, Wei Yang wrote:
[...]
> BTW, the ZONE_MOVABLE handling looks strange to me and the comment "Treat
> pages to be ZONE_MOVABLE in ZONE_NORMAL as absent pages and vice versa" is
> hard to understand. From the code point of view, if zone_type is ZONE_NORMAL,
> each memblock region between zone_start_pfn and zone_end_pfn would be treated
> as absent pages if it is not mirrored. Do you have some hint on this?
Not really, sorry, this area is full of awkward and subtle code when new
changes build on top of previous awkwardness/surprises. Any cleanup
would be really appreciated. That is the reason I didn't like the
initial check all that much.
--
Michal Hocko
SUSE Labs