mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Zhiteng Qiu <qiuzhiteng@hygon.cn>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ying Huang <ying.huang@linux.alibaba.com>,
	Zi Yan <ziy@nvidia.com>, Matthew Brost <matthew.brost@intel.com>,
	Joshua Hahn <joshua.hahnjy@gmail.com>,
	Byungchul Park <byungchul@sk.com>,
	Gregory Price <gourry@gourry.net>,
	Alistair Popple <apopple@nvidia.com>,
	Xin Hao <xhao@linux.alibaba.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Yuan Zhong <zhongyuan@hygon.cn>, Shifei Ge <geshifei@hygon.cn>,
	Jianyong Wu <wujianyong@hygon.cn>,
	Shijie Huang <huangsj@hygon.cn>, Yibin Liu <liuyibin@hygon.cn>,
	Fengyu Wang <wangfengyu@hygon.cn>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm/migrate: don't batch the TLB flush when there is nothing to batch
Date: Mon, 9 Nov 2026 21:36:40 +0100	[thread overview]
Message-ID: <3a137aa0-d0b5-4267-b64c-d58ab4235603@kernel.org> (raw)
In-Reply-To: <20261110001816.2186986-1-qiuzhiteng@hygon.cn>

On 11/9/26 17:18, Zhiteng Qiu wrote:
> On 11/9/26 14:07, David Hildenbrand (Arm) wrote:
>> For the future, please don't send new revisions in reply to old revisions.
> 
> Sorry about that. I'll send the next revision as a new thread.
> 
>> Is there no way to avoid that boolean?
> 
> [...]
> 
>> This is all information the caller could provide, and the caller could just
>> provide the TTU flag then instead of passing a new "bool".
>>
>> Also, likely this check can be put into a separate helper function.
> 
> Agreed. I'll move the decision into a helper called from
> migrate_pages_batch() and pass the resulting flags to
> migrate_folio_unmap().
> 
>> I am not quite happy about the folio_mapcount() check, though: as soon as we
>> optimize try_to_unmap() to batch better for large folios, it would be just plain
>> wrong.
> 
> That makes sense. A large folio's mapcount alone would not tell us
> how many separate flushes are needed once its PTEs can be handled
> in a batch.
> 
> Would it make sense to restrict the optimization to a single,
> singly mapped small folio and keep batching for all large folios,
> as in the scope of v2? The changelog performance numbers were
> measured with the v2 check. Or do you have a different direction
> in mind?

Likely best to focus on small folios first.

-- 
Cheers,

David

      reply	other threads:[~2026-11-09 20:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  4:16 [PATCH] " Zhiteng Qiu
2026-11-06  9:37 ` Huang, Ying
2026-11-06 10:09   ` Zhiteng Qiu
2026-11-06 17:50     ` Zhiteng Qiu
2026-11-07  6:54       ` Huang, Ying
2026-11-07 11:07         ` Zhiteng Qiu
2026-11-07 12:22           ` Huang, Ying
2026-11-07 12:26 ` Huang, Ying
2026-11-07 14:34 ` [PATCH v2] " Zhiteng Qiu
2026-11-08 12:52   ` Huang, Ying
2026-11-08 14:42     ` Zi Yan
2026-11-09 12:29   ` [PATCH v3] " Zhiteng Qiu
2026-11-09 13:07     ` David Hildenbrand (Arm)
2026-11-09 16:18       ` Zhiteng Qiu
2026-11-09 20:36         ` David Hildenbrand (Arm) [this message]

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=3a137aa0-d0b5-4267-b64c-d58ab4235603@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=byungchul@sk.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=geshifei@hygon.cn \
    --cc=gourry@gourry.net \
    --cc=huangsj@hygon.cn \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuyibin@hygon.cn \
    --cc=matthew.brost@intel.com \
    --cc=qiuzhiteng@hygon.cn \
    --cc=wangfengyu@hygon.cn \
    --cc=wujianyong@hygon.cn \
    --cc=xhao@linux.alibaba.com \
    --cc=ying.huang@linux.alibaba.com \
    --cc=zhongyuan@hygon.cn \
    --cc=ziy@nvidia.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

all inboxes | Powered by JetHome®