[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yn4OxDIsl3OfB+6W@localhost.localdomain>
Date: Fri, 13 May 2022 09:54:44 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Rei Yamamoto <yamamoto.rei@...fujitsu.com>
Cc: akpm@...ux-foundation.org, mgorman@...hsingularity.net,
vvghjk1234@...il.com, aquini@...hat.com, ddutile@...hat.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm, compaction: fast_find_migrateblock() should return
pfn in the target zone
On Wed, May 11, 2022 at 01:43:00PM +0900, Rei Yamamoto wrote:
> Prevent returning a pfn outside the target zone in case that not
> aligned with pageblock boundary.
> Otherwise isolate_migratepages_block() would handle pages not in
> the target zone.
>
> Signed-off-by: Rei Yamamoto <yamamoto.rei@...fujitsu.com>
Reviewed-by: Oscar Salvador <osalvador@...e.de>
> ---
> mm/compaction.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index fe915db6149b..de42b8e48758 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1858,6 +1858,8 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
>
> update_fast_start_pfn(cc, free_pfn);
> pfn = pageblock_start_pfn(free_pfn);
> + if (pfn < cc->zone->zone_start_pfn)
> + pfn = cc->zone->zone_start_pfn;
> cc->fast_search_fail = 0;
> found_block = true;
> set_pageblock_skip(freepage);
> --
> 2.27.0
>
>
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists