From: SJ Park <sj@kernel.org>
To: Shivank Garg <shivankg@amd.com>
Cc: SJ Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>, Zi Yan <ziy@nvidia.com>,
Matthew Brost <matthew.brost@intel.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>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
"Mike Rapoport" <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
"Michal Hocko" <mhocko@suse.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Dev Jain <dev.jain@arm.com>
Subject: Re: [PATCH v2 1/3] mm/migrate: rename page to folio leftovers
Date: Wed, 1 Jul 2026 16:54:18 -0700 [thread overview]
Message-ID: <20260701235419.85771-1-sj@kernel.org> (raw)
In-Reply-To: <20260701-migrate-cleanups-prep-v2-1-d9e8f17130b1@amd.com>
On Wed, 1 Jul 2026 05:17:20 +0000 Shivank Garg <shivankg@amd.com> wrote:
> Rename migrate_folio_undo_src()'s page_was_mapped parameter to was_mapped,
> unmap_and_move_huge_page() to unmap_and_move_hugetlb_folio(), its
> page_was_mapped variable to was_mapped and fix stale "page" wording in its
> comments.
>
> Also fix migrate_folio() kerneldoc to say "folio" instead of "page".
Looks cleaner to me!
>
> Suggested-by: Dev Jain <dev.jain@arm.com>
> Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
> Signed-off-by: Shivank Garg <shivankg@amd.com>
Reviewed-by: SJ Park <sj@kernel.org>
A couple of trivial loud-thinking comments below.
> ---
> mm/migrate.c | 36 +++++++++++++++++-------------------
> 1 file changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 49e10feeb094..858350ca58b4 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -884,7 +884,7 @@ static int __migrate_folio(struct address_space *mapping, struct folio *dst,
> * @mapping: The address_space containing the folio.
> * @dst: The folio to migrate the data to.
> * @src: The folio containing the current data.
> - * @mode: How to migrate the page.
> + * @mode: How to migrate the folio.
> *
> * Common logic to directly migrate a single LRU folio suitable for
> * folios that do not have private data.
> @@ -1157,13 +1157,10 @@ static void __migrate_folio_extract(struct folio *dst,
> }
>
> /* Restore the source folio to the original state upon failure */
> -static void migrate_folio_undo_src(struct folio *src,
> - int page_was_mapped,
> - struct anon_vma *anon_vma,
> - bool locked,
> - struct list_head *ret)
> +static void migrate_folio_undo_src(struct folio *src, int was_mapped,
> + struct anon_vma *anon_vma, bool locked, struct list_head *ret)
I like two tabs indentations "slightly" over aligning with tabs + spaces. So
above looks good to me.
[...]
> @@ -1663,10 +1661,10 @@ static int migrate_hugetlbs(struct list_head *from, new_folio_t get_new_folio,
> continue;
> }
>
> - rc = unmap_and_move_huge_page(get_new_folio,
> - put_new_folio, private,
> - folio, pass > 2, mode,
> - reason, ret_folios);
> + rc = unmap_and_move_hugetlb_folio(get_new_folio,
> + put_new_folio, private,
> + folio, pass > 2, mode,
> + reason, ret_folios);
And for the same reason I wonder if we could use the two tabs indentation here.
That may reduce lines and make diffstat more cool? Just loudly wondering. My
R-b: is valid regardless.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-07-01 23:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 5:17 [PATCH v2 0/3] mm/migrate: preparatory cleanups for batch copy and offload Shivank Garg
2026-07-01 5:17 ` [PATCH v2 1/3] mm/migrate: rename page to folio leftovers Shivank Garg
2026-07-01 15:39 ` Zi Yan
2026-07-01 23:54 ` SJ Park [this message]
2026-07-01 5:17 ` [PATCH v2 2/3] mm/migrate: fix stale list name in migrate_folios_move() comment Shivank Garg
2026-07-01 5:17 ` [PATCH v2 3/3] mm/migrate: use migrate_info field instead of private Shivank Garg
2026-07-02 0:00 ` SJ Park
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=20260701235419.85771-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=byungchul@sk.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=gourry@gourry.net \
--cc=joshua.hahnjy@gmail.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=matthew.brost@intel.com \
--cc=mhocko@suse.com \
--cc=rakie.kim@sk.com \
--cc=rppt@kernel.org \
--cc=shivankg@amd.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.