diff mbox series

[mm-unstable] mm/hugetlb: update alloc_and_dissolve_hugetlb_folio comments

Message ID 20221206233512.146535-1-sidhartha.kumar@oracle.com (mailing list archive)
State New
Headers show
Series [mm-unstable] mm/hugetlb: update alloc_and_dissolve_hugetlb_folio comments | expand

Commit Message

Sidhartha Kumar Dec. 6, 2022, 11:35 p.m. UTC
Update the comments inside alloc_and_dissolve_hugetlb_folio to reflect the
conversion to folios.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
---

This can be folded into 73133b81bf715cc9d426d177c07d97f50061c28f
mm/hugetlb: change hugetlb allocation functions to return a folio
if that is preferred.

 mm/hugetlb.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index c946abb868e2..e70ff6768596 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2766,8 +2766,8 @@  static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
 	int ret = 0;
 
 	/*
-	 * Before dissolving the page, we need to allocate a new one for the
-	 * pool to remain stable.  Here, we allocate the page and 'prep' it
+	 * Before dissolving the folio, we need to allocate a new one for the
+	 * pool to remain stable.  Here, we allocate the folio and 'prep' it
 	 * by doing everything but actually updating counters and adding to
 	 * the pool.  This simplifies and let us do most of the processing
 	 * under the lock.
@@ -2795,7 +2795,7 @@  static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
 		goto free_new;
 	} else if (!folio_test_hugetlb_freed(old_folio)) {
 		/*
-		 * Page's refcount is 0 but it has not been enqueued in the
+		 * Folio's refcount is 0 but it has not been enqueued in the
 		 * freelist yet. Race window is small, so we can succeed here if
 		 * we retry.
 		 */
@@ -2804,7 +2804,7 @@  static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
 		goto retry;
 	} else {
 		/*
-		 * Ok, old_page is still a genuine free hugepage. Remove it from
+		 * Ok, old_folio is still a genuine free hugepage. Remove it from
 		 * the freelist and decrease the counters. These will be
 		 * incremented again when calling __prep_account_new_huge_page()
 		 * and enqueue_hugetlb_folio() for new_folio. The counters will
@@ -2813,14 +2813,14 @@  static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
 		remove_hugetlb_folio(h, old_folio, false);
 
 		/*
-		 * Ref count on new page is already zero as it was dropped
+		 * Ref count on new_folio is already zero as it was dropped
 		 * earlier.  It can be directly added to the pool free list.
 		 */
 		__prep_account_new_huge_page(h, nid);
 		enqueue_hugetlb_folio(h, new_folio);
 
 		/*
-		 * Pages have been replaced, we can safely free the old one.
+		 * Folio has been replaced, we can safely free the old one.
 		 */
 		spin_unlock_irq(&hugetlb_lock);
 		update_and_free_hugetlb_folio(h, old_folio, false);
@@ -2830,7 +2830,7 @@  static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
 
 free_new:
 	spin_unlock_irq(&hugetlb_lock);
-	/* Page has a zero ref count, but needs a ref to be freed */
+	/* Folio has a zero ref count, but needs a ref to be freed */
 	folio_ref_unfreeze(new_folio, 1);
 	update_and_free_hugetlb_folio(h, new_folio, false);