Re: [PATCH 04/10] mm/migrate: make migrate_pages() return nr_succeeded
From: Dave Hansen
Date: Fri Apr 09 2021 - 11:50:54 EST
On 4/8/21 11:17 AM, Oscar Salvador wrote:
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -8490,7 +8490,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
> cc->nr_migratepages -= nr_reclaimed;
>
> ret = migrate_pages(&cc->migratepages, alloc_migration_target,
> - NULL, (unsigned long)&mtc, cc->mode, MR_CONTIG_RANGE);
> + NULL, (unsigned long)&mtc, cc->mode, MR_CONTIG_RANGE,
> + NULL);
> }
> if (ret < 0) {
> putback_movable_pages(&cc->migratepages);
I also considered passing NULL to mean "I don't care about
nr_succeeded". I mostly avoided it to reduce churn. But, looking at it
here, it does seem cleaner.
Any objections to moving over to Oscar's suggestion?