lkml.org 
[lkml]   [2024]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] mm/migrate_device: further convert migrate_device_unmap() to folios
On Thu, Feb 15, 2024 at 09:38:42AM +1100, Alistair Popple wrote:
> > +++ b/mm/migrate_device.c
> > @@ -377,33 +377,33 @@ static unsigned long migrate_device_unmap(unsigned long *src_pfns,
> > continue;
> > }
> >
> > + folio = page_folio(page);
>
> Instead of open coding the migrate pfn to folio conversion I think we
> should define a migrate_pfn_to_folio() and get rid of the intermediate
> local variable. This would also allow a minor clean up to the final for
> loop in migrate_device_unmap().

I think we should stop passing pfns into migrate_device_unmap().
Passing an array of folios would make more sense to every function
involved, afaict. Maybe I overlooked something ...

Also, have you had any thoughts on whether device memory is a type of
folio like anon/file memory, or is it its own type?

\
 
 \ /
  Last update: 2024-05-27 15:04    [W:1.378 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site