[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87edbwm6fh.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Wed, 27 Mar 2024 16:21:06 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: <akpm@...ux-foundation.org>, <david@...hat.com>,
<mgorman@...hsingularity.net>, <wangkefeng.wang@...wei.com>,
<jhubbard@...dia.com>, <21cnbao@...il.com>, <ryan.roberts@....com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] mm: support multi-size THP numa balancing
Baolin Wang <baolin.wang@...ux.alibaba.com> writes:
> On 2024/3/27 10:04, Huang, Ying wrote:
>> Baolin Wang <baolin.wang@...ux.alibaba.com> writes:
>>
>>> Now the anonymous page allocation already supports multi-size THP (mTHP),
>>> but the numa balancing still prohibits mTHP migration even though it is an
>>> exclusive mapping, which is unreasonable.
>>>
>>> Allow scanning mTHP:
>>> Commit 859d4adc3415 ("mm: numa: do not trap faults on shared data section
>>> pages") skips shared CoW pages' NUMA page migration to avoid shared data
>>> segment migration. In addition, commit 80d47f5de5e3 ("mm: don't try to
>>> NUMA-migrate COW pages that have other uses") change to use page_count()
>>> to avoid GUP pages migration, that will also skip the mTHP numa scaning.
>>> Theoretically, we can use folio_maybe_dma_pinned() to detect the GUP
>>> issue, although there is still a GUP race, the issue seems to have been
>>> resolved by commit 80d47f5de5e3. Meanwhile, use the folio_likely_mapped_shared()
>>> to skip shared CoW pages though this is not a precise sharers count. To
>>> check if the folio is shared, ideally we want to make sure every page is
>>> mapped to the same process, but doing that seems expensive and using
>>> the estimated mapcount seems can work when running autonuma benchmark.
>> Because now we can deal with shared mTHP, it appears even possible
>> to
>> remove folio_likely_mapped_shared() check?
>
> IMO, the issue solved by commit 859d4adc3415 is about shared CoW
> mapping, and I prefer to measure it in another patch:)
I mean we can deal with shared mTHP (by multiple threads or multiple
processes) with this patch. Right?
[snip]
--
Best Regards,
Huang, Ying
Powered by blists - more mailing lists