Re: [PATCH 04/10] mm/migrate: make migrate_pages() return nr_succeeded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 9, 2021 at 8:50 AM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> 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?

No, fine to me.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux