Re: [PATCH] mm, compaction: fast_find_migrateblock() should return pfn in the target zone

From: Andrew Morton
Date: Wed May 11 2022 - 22:20:22 EST


On Thu, 12 May 2022 10:47:36 +0900 Rei Yamamoto <yamamoto.rei@xxxxxxxxxxxxxx> wrote:

> ...
>
> > Sorry, I think you're right. And could you please add the runtime effect of this issue?
> >
> > Anyway, this patch looks good to me now. Thanks!
>
> Thank you for your review.
> The runtime effect is that compaction become unintended behavior.
> For example, pages not in the target zone are added to cc->migratepages list in isolate_migratepages_block().
> As a result, pages migrate between nodes unintentionally.

Thanks. I updated the changelog thusly:

: At present, pages not in the target zone are added to cc->migratepages
: list in isolate_migratepages_block(). As a result, pages may migrate
: between nodes unintentionally.
:
: Avoid returning a pfn outside the target zone in the case that it is
: not aligned with a pageblock boundary. Otherwise
: isolate_migratepages_block() will handle pages not in the target zone.