Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages

From: Oscar Salvador
Date: Thu Dec 20 2018 - 10:37:39 EST


On Thu, Dec 20, 2018 at 03:39:39PM +0100, Michal Hocko wrote:
> Yes, you are missing that this code should be as sane as possible ;) You
> are right that we are only processing one pageorder worth of pfns and
> that the page order is bound to HUGETLB_PAGE_ORDER _right_now_. But
> there is absolutely zero reason to hardcode that assumption into a
> simple loop, right?

Of course, it makes sense to keep the code as sane as possible.
This is why I said I was not against the change, but I wanted to
see if I was missing something else besides the assumption.

Thanks
--
Oscar Salvador
SUSE L3