linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang, Ying" <ying.huang@intel.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: <akpm@linux-foundation.org>,  <david@redhat.com>,
	<mgorman@techsingularity.net>,  <wangkefeng.wang@huawei.com>,
	<jhubbard@nvidia.com>,  <21cnbao@gmail.com>,
	 <ryan.roberts@arm.com>, <linux-mm@kvack.org>,
	 <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] mm: support multi-size THP numa balancing
Date: Wed, 27 Mar 2024 16:21:06 +0800	[thread overview]
Message-ID: <87edbwm6fh.fsf@yhuang6-desk2.ccr.corp.intel.com> (raw)
In-Reply-To: <bc671388-f398-4776-af15-c144f2c39d78@linux.alibaba.com> (Baolin Wang's message of "Wed, 27 Mar 2024 16:09:23 +0800")

Baolin Wang <baolin.wang@linux.alibaba.com> writes:

> On 2024/3/27 10:04, Huang, Ying wrote:
>> Baolin Wang <baolin.wang@linux.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



  reply	other threads:[~2024-03-27  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 11:51 [PATCH 0/2] " Baolin Wang
2024-03-26 11:51 ` [PATCH 1/2] mm: factor out the numa mapping rebuilding into a new helper Baolin Wang
2024-03-26 11:51 ` [PATCH 2/2] mm: support multi-size THP numa balancing Baolin Wang
2024-03-27  2:04   ` Huang, Ying
2024-03-27  8:09     ` Baolin Wang
2024-03-27  8:21       ` Huang, Ying [this message]
2024-03-27  8:47         ` David Hildenbrand
2024-03-28  1:09           ` Huang, Ying
2024-03-28  9:25   ` David Hildenbrand
2024-03-28 11:34     ` Baolin Wang
2024-03-28 12:07       ` David Hildenbrand
2024-03-28 12:25         ` David Hildenbrand
2024-03-28 14:18           ` Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edbwm6fh.fsf@yhuang6-desk2.ccr.corp.intel.com \
    --to=ying.huang@intel.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=ryan.roberts@arm.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox