Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Garg, Shivank" <shivankg@amd.com>,
	Andrew Morton <akpm@linux-foundation.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>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Dev Jain <dev.jain@arm.com>
Subject: Re: [PATCH 1/3] mm/migrate: rename page to folio leftovers
Date: Fri, 26 Jun 2026 19:01:53 +0200	[thread overview]
Message-ID: <6da834ec-e62a-467a-9951-b591cf9c508d@kernel.org> (raw)
In-Reply-To: <6d477d0b-1f14-4e33-958d-e6a66c647963@amd.com>

On 6/26/26 18:42, Garg, Shivank wrote:
> 
> 
> On 6/26/2026 9:40 PM, David Hildenbrand (Arm) wrote:
>> On 6/26/26 11:37, Shivank Garg wrote:
>>> Rename migrate_folio_undo_src()'s page_was_mapped parameter to
>>> folio_was_mapped, matching FOLIO_WAS_MAPPED naming.
>>>
>>> Also fix migrate_folio() kerneldoc to say "folio" instead of "page".
>>>
>>> Suggested-by: Dev Jain <dev.jain@arm.com>
>>> Signed-off-by: Shivank Garg <shivankg@amd.com>
>>> ---
>>>  mm/migrate.c | 11 ++++-------
>>>  1 file changed, 4 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/mm/migrate.c b/mm/migrate.c
>>> index d9b23909d716..dd7dbd8d84a0 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 folio_was_mapped,
>>> +		struct anon_vma *anon_vma, bool locked, struct list_head *ret)
>>>  {
>>> -	if (page_was_mapped)
>>> +	if (folio_was_mapped)
>>
>> Why not "was_mapped" given that folio is part of the function name?
>>
>> (it's also not "folio_locked") :)
>>
> 
> yes, makes sense. I'll use was_mapped.
> 
> While here, what's your opinion on unmap_and_move_huge_page()?
> It also has local variable named page_was_mapped even though the function
> is fully folio-based. The function name and comments still have "page".

Ah, yeah ... please fix that.

And while at it, rename it to "unmap_and_move_hugetlb_folio". Thx :)

-- 
Cheers,

David


  reply	other threads:[~2026-06-26 17:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  9:37 [PATCH 0/3] mm/migrate: preparatory cleanups for batch copy and offload Shivank Garg
2026-06-26  9:37 ` [PATCH 1/3] mm/migrate: rename page to folio leftovers Shivank Garg
2026-06-26 16:10   ` David Hildenbrand (Arm)
2026-06-26 16:42     ` Garg, Shivank
2026-06-26 17:01       ` David Hildenbrand (Arm) [this message]
2026-06-26  9:37 ` [PATCH 2/3] mm/migrate: fix stale list name in migrate_folios_move() comment Shivank Garg
2026-06-26 16:12   ` David Hildenbrand (Arm)
2026-06-26 19:02   ` Zi Yan
2026-06-26  9:37 ` [PATCH 3/3] mm/migrate: use migrate_info field instead of private Shivank Garg
2026-06-26 18:58   ` 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=6da834ec-e62a-467a-9951-b591cf9c508d@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=byungchul@sk.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox