From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC7D632B13E for ; Wed, 1 Jul 2026 23:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782950063; cv=none; b=Z0BtR3IkZy0pR7iA00YGZjvf0Yj/gWKHLjTXiAAv4TWt0Uh6yElFrP110KcQR6a1+pRxQcIKg3yWj6Zm+4odZz1mJMmzXGBaTPJnreh2ltcTzz2+LfjBZxUTWy3nkzFdTJ5EUp9/tFbOul1NRDMMoLrm6OYNQV81+MTYHNiIxIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782950063; c=relaxed/simple; bh=r+qEp+ST/2qsaO4gmk3tzvdbnkrbMxNX3dy8LMyj5QY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XzBpAPZL5iyz4JGiJadNKkK+z0JlTqi+PQF90gjtu5qJHc58Q12OO0usL7pSXpJ4XnGkqp/D0bksgu9yy5U3BoSd9T/1LDqZpBuefDkDQcnCiaI/WFiCDvP4Nn73+fM/AIwWE3cFkzDL04r+fZUvDT0cstDljtXOgeornazGL2E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UXW9yIo0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UXW9yIo0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB3AE1F000E9; Wed, 1 Jul 2026 23:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782950062; bh=p6TrkYATuzAs8wAal77mnvDyWkYniqycgHoIXHeUKgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UXW9yIo0qW1Hb1ze5K6r6SOGUkjNZ2UuE86o3GWYMucflQ811IZykLoEoWIniEtYF GZu5c0YpSGEEmQkgTRnFCRzSqmbAh78PNmKD25YtTb5U9JXkMMjlQ+RHG0yyE4ZkN/ gg5+n9V8jWwFrNugS4ERbHFIx8xiSg3+P94E8z7CYjYIgSOeOrh47sM7vUMbPCz7o6 D7f/5XmDL5XxgZwnDDRFoGVZEvxPon+jmOunOmqM3lbE10wfPocwMAY+J7nFLVfNC4 K5V1CZgr+oeIJfL5rjIdcHIcP9VLecXXm15qPMYhWA7SxlQA6mFWVjK9CsjIhBhvht 3/ekvbNgENLwg== From: SJ Park To: Shivank Garg Cc: SJ Park , Andrew Morton , David Hildenbrand , Zi Yan , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , "Alistair Popple" , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , "Mike Rapoport" , Suren Baghdasaryan , "Michal Hocko" , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dev Jain Subject: Re: [PATCH v2 1/3] mm/migrate: rename page to folio leftovers Date: Wed, 1 Jul 2026 16:54:18 -0700 Message-ID: <20260701235419.85771-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260701-migrate-cleanups-prep-v2-1-d9e8f17130b1@amd.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Wed, 1 Jul 2026 05:17:20 +0000 Shivank Garg 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 > Suggested-by: David Hildenbrand (Arm) > Signed-off-by: Shivank Garg Reviewed-by: SJ Park 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 [...]