[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c233278-1006-4449-81b2-d473b18a66ca@redhat.com>
Date: Fri, 26 Apr 2024 10:26:03 +0200
From: David Hildenbrand <david@...hat.com>
To: Zi Yan <ziy@...dia.com>, Andrew Morton <akpm@...ux-foundation.org>,
linux-mm@...ck.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Yang Shi <shy828301@...il.com>, 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
> @@ -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!
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists