From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Zi Yan <ziy@nvidia.com>, "Liam R. Howlett" <liam@infradead.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>, <linux-mm@kvack.org>
Subject: Re: [PATCH 4/4] mm: migrate_device: use walk_page_range_vma() in migrate_vma_collect()
Date: Thu, 18 Jun 2026 09:46:09 +0800 [thread overview]
Message-ID: <84b16b25-e62c-430a-8732-45bb2d180e66@huawei.com> (raw)
In-Reply-To: <a0335462-5bfc-4d8c-ae55-cfe2587ecd0e@kernel.org>
On 6/17/2026 9:30 PM, David Hildenbrand (Arm) wrote:
> On 6/17/26 10:26, Kefeng Wang wrote:
>> The migrate_vma_collect() uses walk_page_range() to walk the page
>> table. Fortunately, migrate_vma_setup() already validates that the
>> entire range falls within a single VMA.
>>
>> Since there is no .test_walk in migrate_vma_walk_ops and VM_PFNMAP
>> VM_PFNMAP
>
> You mention VM_PFNMAP twice.
>
>> has filtered by migrate_vma_setup(), it's safetly replace
>
> s/has/was/
>
> s/ / /
>
> s/safetly/safe to/
>
>> walk_page_range() with walk_page_range_vma() to eliminates an
>
> s/eliminates/eliminate/
Forgive my poor English, will fix them.
>
>> unnecessary find_vma() lookup.
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>> ---
>> mm/migrate_device.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/migrate_device.c b/mm/migrate_device.c
>> index 554754eb26ff..ae39173d6a0e 100644
>> --- a/mm/migrate_device.c
>> +++ b/mm/migrate_device.c
>> @@ -513,7 +513,7 @@ static void migrate_vma_collect(struct migrate_vma *migrate)
>> migrate->pgmap_owner);
>> mmu_notifier_invalidate_range_start(&range);
>>
>> - walk_page_range(migrate->vma->vm_mm, migrate->start, migrate->end,
>> + walk_page_range_vma(migrate->vma, migrate->start, migrate->end,
>> &migrate_vma_walk_ops, migrate);
>>
>> mmu_notifier_invalidate_range_end(&range);
>
> LGTM
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
>
Thanks.
next prev parent reply other threads:[~2026-06-18 1:46 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 8:26 [PATCH 0/4] mm: convert to walk_page_range_vma() to eliminate find_vma() Kefeng Wang
2026-06-17 8:26 ` [PATCH 1/4] mm: mincore: try per-VMA lock firstly and use walk_page_range_vma() Kefeng Wang
2026-06-17 14:54 ` Zi Yan
2026-06-18 1:11 ` Kefeng Wang
2026-06-18 1:20 ` Zi Yan
2026-06-17 15:01 ` David Hildenbrand (Arm)
2026-06-18 1:41 ` Kefeng Wang
2026-06-18 8:15 ` David Hildenbrand (Arm)
2026-06-17 8:26 ` [PATCH 2/4] mm: mprotect: use walk_page_range_vma() in mprotect_fixup() Kefeng Wang
2026-06-17 13:25 ` David Hildenbrand (Arm)
2026-06-18 1:42 ` Kefeng Wang
2026-06-17 14:28 ` Zi Yan
2026-06-18 1:43 ` Kefeng Wang
2026-06-18 8:17 ` David Hildenbrand (Arm)
2026-06-17 8:26 ` [PATCH 3/4] mm: mlock: use walk_page_range_vma() in mlock_vma_pages_range() Kefeng Wang
2026-06-17 13:26 ` David Hildenbrand (Arm)
2026-06-17 14:35 ` Zi Yan
2026-06-18 8:16 ` David Hildenbrand (Arm)
2026-06-18 8:27 ` Kefeng Wang
2026-06-17 8:26 ` [PATCH 4/4] mm: migrate_device: use walk_page_range_vma() in migrate_vma_collect() Kefeng Wang
2026-06-17 13:30 ` David Hildenbrand (Arm)
2026-06-18 1:46 ` Kefeng Wang [this message]
2026-06-17 14:37 ` 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=84b16b25-e62c-430a-8732-45bb2d180e66@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=liam@infradead.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--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