lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHbLzkqZmd=HGQ8_adjEipp49GEzN45bz=NwJPi9X+qOHnNFZQ@mail.gmail.com>
Date: Fri, 26 Apr 2024 11:41:42 -0700
From: Yang Shi <shy828301@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: Zi Yan <ziy@...dia.com>, Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org, 
	"Matthew Wilcox (Oracle)" <willy@...radead.org>, Ryan Roberts <ryan.roberts@....com>, 
	Barry Song <21cnbao@...il.com>, Lance Yang <ioworker0@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [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@...hat.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ