[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e994734-1d3a-4c51-9c0b-4e2ce945f198@redhat.com>
Date: Fri, 8 Mar 2024 14:24:13 +0100
From: David Hildenbrand <david@...hat.com>
To: Ryan Roberts <ryan.roberts@....com>, Barry Song <21cnbao@...il.com>,
akpm@...ux-foundation.org, linux-mm@...ck.org
Cc: minchan@...nel.org, fengwei.yin@...el.com, linux-kernel@...r.kernel.org,
mhocko@...e.com, peterx@...hat.com, shy828301@...il.com,
songmuchun@...edance.com, wangkefeng.wang@...wei.com, xiehuan09@...il.com,
zokeefe@...gle.com, chrisl@...nel.org, yuzhao@...gle.com,
Barry Song <v-songbaohua@...o.com>, Lance Yang <ioworker0@...il.com>
Subject: Re: [PATCH v2] mm: prohibit the last subpage from reusing the entire
large folio
>>> This patch migrates the last subpage to a small folio and immediately
>>> returns the large folio to the system. It benefits both memory availability
>>> and anti-fragmentation.
>>
>> It might be controversial optimization, and as Ryan said, there, are likely
>> other cases where we'd want to migrate off-of a thp if possible earlier.
>
> Personally, I think there might also be cases where you want to copy/reuse the
> entire large folio. If you're application is using 16K THPs perhaps it's a
> bigger win to just treat it like a base page? I expect the cost/benefit will
> change as the THP size increases?
Yes, I think for small folios (i.e., 16KiB) it will be rather easy to
make a decision. The larger the folio, the larger the page fault latency
due to scanning, copying, modifying, which can easily turn undesirable.
At least when it comes to page reuse, I have some simple backup plans
for small folios if I won't be able to make progress with my other
approach. For larger folios, it won't really work/be desirable, though.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists