lkml.org 
[lkml]   [2023]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 4/4] mm/mmu_gather: Store and process pages in contig ranges
On Tue, Aug 29, 2023 at 03:02:22PM +0100, Ryan Roberts wrote:
> >> + if (put_devmap_managed_page(&folio->page))
> >> + continue;
> >> + if (folio_put_testzero(folio))
> >
> > We're only putting one ref for the zone_device folios? Surely
> > this should be ref_sub_and_test like below?
>
> Good point. This function is originally a copy/paste of release_pages(), and I
> obviously missed this. In fact, looking at it again today, I think I'll factor
> out the vast majority into a common helper, since I'm currently duplicating a
> whole bunch here.
>
> In practice I think all devmap folios will be small today though? So while I
> agree I need to fix this, I think in practice it will currently do the right thing?

I think the devdax code uses 2MB folios.

> > You'll be glad to know I've factored out a nice little helper for that.
>
> OK, what's it called? This is just copied from release_pages() at the moment.
> Happy to use your helper in the refactored common helper.

I'll send out those patches today.

\
 
 \ /
  Last update: 2023-08-29 16:21    [W:0.097 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site