lkml.org 
[lkml]   [2024]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4] mm/rmap: do not add fully unmapped large folio to deferred split list
On Fri, Apr 26, 2024 at 1:26 AM David Hildenbrand <david@redhat.com> wrote:
>
>
> > @@ -1553,9 +1557,9 @@ static __always_inline void __folio_remove_rmap(struct folio *folio,
> > * page of the folio is unmapped and at least one page
> > * is still mapped.
> > */
> > - if (folio_test_large(folio) && folio_test_anon(folio))
> > - if (level == RMAP_LEVEL_PTE || nr < nr_pmdmapped)
> > - deferred_split_folio(folio);
> > + if (folio_test_large(folio) && folio_test_anon(folio) &&
> > + list_empty(&folio->_deferred_list) && partially_mapped)
> > + deferred_split_folio(folio);
>
> And now I realize that we can then even drop the folio_test_large(folio)
> check here!

Good idea. This is more understandable.

>
> --
> Cheers,
>
> David / dhildenb
>

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