[PATCH 01/10] mm: turn migrate_vma upside down
Jason Gunthorpe
jgg at mellanox.com
Sat Aug 17 12:50:06 UTC 2019
On Sat, Aug 17, 2019 at 01:31:28PM +0200, Christoph Hellwig wrote:
> On Fri, Aug 16, 2019 at 05:11:07PM +0000, Jason Gunthorpe wrote:
> > - if (args->cpages)
> > - migrate_vma_prepare(args);
> > - if (args->cpages)
> > - migrate_vma_unmap(args);
> > + if (!args->cpages)
> > + return 0;
> > +
> > + migrate_vma_prepare(args);
> > + migrate_vma_unmap(args);
>
> I don't think this is ok. Both migrate_vma_prepare and migrate_vma_unmap
> can reduce args->cpages, including possibly to 0.
Oh, yes, that was far too hasty on my part, I had assumed collect set
the cpages. Thank you for checking
Jason
More information about the dri-devel
mailing list