From: Hui Su <sh_def@163.com>
To: Balbir Singh <balbirs@nvidia.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>
Cc: Matthew Brost <matthew.brost@intel.com>, Zi Yan <ziy@nvidia.com>,
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>,
Alistair Popple <apopple@nvidia.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/migrate_device: consolidate compound folio handling
Date: Sat, 12 Sep 2026 17:46:17 +0900 [thread overview]
Message-ID: <173eadcb2d7b18b3f8c57a7c57bd7652.sh_def@163.com> (raw)
In-Reply-To: <1ca189d6-5b36-4d70-9dfc-34316591447a@nvidia.com>
Hi Balbir,
Thanks for the review and the Ack.
> Don't we want to check for *src_pfn == 0?
Yes. I'll avoid setting MIGRATE_PFN_COMPOUND when
migrate_device_pfn_lock() fails.
I don't think we should return 1 immediately when *src_pfn is zero,
though. We should still consume and clear the slots corresponding to the
whole compound folio. Otherwise, the outer loop would advance by only one
entry and the next iteration could treat a tail page of the same folio as
a new source PFN.
So the plan is to keep the folio-sized slot accounting, but only encode
MIGRATE_PFN_COMPOUND when *src_pfn is non-zero, and only do the
unlock/put when the lock succeeded.
> Can we please change this to VM_WARN_ON_ONCE?
Yes, agreed. I'll switch it to VM_WARN_ON_ONCE() and keep the existing
defensive clear-and-stop behavior.
I'll send a v3 with both changes.
Thanks,
Hui
prev parent reply other threads:[~2026-09-12 8:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 3:44 Hui Su
2026-09-12 4:16 ` Balbir Singh
2026-09-12 8:46 ` Hui Su [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=173eadcb2d7b18b3f8c57a7c57bd7652.sh_def@163.com \
--to=sh_def@163.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=byungchul@sk.com \
--cc=david@kernel.org \
--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=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
all inboxes | Powered by JetHome®