[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZLVeeDmPDWupYzSH@casper.infradead.org>
Date: Mon, 17 Jul 2023 16:30:00 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Ryan Roberts <ryan.roberts@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Yin Fengwei <fengwei.yin@...el.com>,
David Hildenbrand <david@...hat.com>,
Yu Zhao <yuzhao@...gle.com>, Yang Shi <shy828301@...il.com>,
"Huang, Ying" <ying.huang@...el.com>, Zi Yan <ziy@...dia.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v1 1/3] mm: Allow deferred splitting of arbitrary large
anon folios
On Mon, Jul 17, 2023 at 03:31:08PM +0100, Ryan Roberts wrote:
> In preparation for the introduction of large folios for anonymous
> memory, we would like to be able to split them when they have unmapped
> subpages, in order to free those unused pages under memory pressure. So
> remove the artificial requirement that the large folio needed to be at
> least PMD-sized.
>
> Signed-off-by: Ryan Roberts <ryan.roberts@....com>
> Reviewed-by: Yu Zhao <yuzhao@...gle.com>
> Reviewed-by: Yin Fengwei <fengwei.yin@...el.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> */
> - if (folio_test_pmd_mappable(folio) && folio_test_anon(folio))
> + if (folio_test_large(folio) && folio_test_anon(folio))
> if (!compound || nr < nr_pmdmapped)
> deferred_split_folio(folio);
I wonder if it's worth introducing a folio_test_deferred_split() (better
naming appreciated ...) to allow us to allocate order-1 folios and not
do horrible things. Maybe it's not worth supporting order-1 folios;
we're always better off going to order-2 immediately. Just thinking.
Powered by blists - more mailing lists