From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Zi Yan <ziy@nvidia.com>, Alistair Popple <apopple@nvidia.com>,
Balbir Singh <balbirs@nvidia.com>
Cc: Matthew Brost <matthew.brost@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Joshua Hahn <joshua.hahnjy@gmail.com>,
Rakie Kim <rakie.kim@sk.com>, Byungchul Park <byungchul@sk.com>,
Gregory Price <gourry@gourry.net>,
Ying Huang <ying.huang@linux.alibaba.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH] mm/migrate_device: avoid overflowing migrate_vma collection arrays
Date: Wed, 15 Jul 2026 14:40:40 +0200 [thread overview]
Message-ID: <8f7f0a6f-d819-4a56-bb5c-d690664dd80e@kernel.org> (raw)
In-Reply-To: <DJYQKBV5C3WQ.2A702GAYGPW71@nvidia.com>
On 7/15/26 02:59, Zi Yan wrote:
> On Tue Jul 14, 2026 at 1:30 AM EDT, Alistair Popple wrote:
>> On 2026-07-14 at 10:10 +1000, Balbir Singh <balbirs@nvidia.com> wrote...
>>>
>>> I had a patch to add tracepoints to the code and some of that instrumentation
>>> included this data. A combination of the trace points + hmm_tests will help us
>>> get some data to start with.
>>
>> But hmm-test already has a nice bandwidth benchmark :) We just need to force
>> the slow path. That used to be easier before I simplified the trylock handling
>> but with the below patch applied I get quite a lot better perf from the
>> optimisation. Note the patch isn't entirely correct as it assumes any locked
>> page was locked by migrate_vma_collect_pmd but it's good enough for the purposes
>> here.
>
> Thanks for the numbers. If I read them correctly, the optimization
> has about 3x throughput of unoptimzied version. The optimization has to
> stay.
>
> I will try to come up with a fix that resets collected PFNs, reverts
> established migration entry along with putting folio ref, and restarts
> from the beginning.
IIUC, with the page table gone there are no entries to revert. We only have to
take care of folio lock+ref.
Which raises a question: how can the page table be gone when it contained
migration entries? Probably MADV_DONTNEED could clear them, followed by
reclaiming the page table, maybe.
--
Cheers,
David
next prev parent reply other threads:[~2026-07-15 13:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 1:50 [PATCH] mm/migrate_device: avoid overflowing migrate_vma collection arrays Zi Yan
2026-07-08 2:45 ` Balbir Singh
2026-07-08 8:43 ` David Hildenbrand (Arm)
2026-07-08 14:35 ` Zi Yan
2026-07-08 14:43 ` Zi Yan
2026-07-10 11:30 ` Zi Yan
2026-07-10 11:56 ` David Hildenbrand (Arm)
2026-07-10 15:35 ` Zi Yan
2026-07-13 12:57 ` David Hildenbrand (Arm)
2026-07-13 15:20 ` Zi Yan
[not found] ` <57cc487b-6ec3-4ca6-8735-f37644e2b0ab@kernel.org>
2026-07-13 15:39 ` Zi Yan
2026-07-13 22:24 ` Alistair Popple
2026-07-14 0:10 ` Balbir Singh
2026-07-14 5:30 ` Alistair Popple
2026-07-15 0:59 ` Zi Yan
2026-07-15 12:40 ` David Hildenbrand (Arm) [this message]
2026-07-15 13:30 ` Zi Yan
2026-07-10 2:54 ` Zi Yan
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=8f7f0a6f-d819-4a56-bb5c-d690664dd80e@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=byungchul@sk.com \
--cc=gourry@gourry.net \
--cc=joshua.hahnjy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.brost@intel.com \
--cc=rakie.kim@sk.com \
--cc=sashiko-bot@kernel.org \
--cc=wangkefeng.wang@huawei.com \
--cc=ying.huang@linux.alibaba.com \
--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