linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Frank van der Linden <fvdl@google.com>,
	Mike Rapoport <rppt@kernel.org>,
	Muchun Song <muchun.song@linux.dev>,
	Wei Yang <richard.weiyang@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH mm-unstable 1/2] mm/mm_init: rename __init_reserved_page_zone to __init_page_from_nid
Date: Tue, 25 Feb 2025 10:30:16 +0200	[thread overview]
Message-ID: <20250225083017.567649-2-rppt@kernel.org> (raw)
In-Reply-To: <20250225083017.567649-1-rppt@kernel.org>

From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>

__init_reserved_page_zone() function finds the zone for pfn and nid and
performs initialization of a struct page with that zone and nid.
There is nothing in that function about reserved pages and it is
misnamed.

Rename it to __init_page_from_nid() to better reflect what the function
does.

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
 mm/hugetlb.c  | 2 +-
 mm/internal.h | 2 +-
 mm/mm_init.c  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 9faa1034704f..778c21da22f0 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3392,7 +3392,7 @@ static void __init hugetlb_bootmem_free_invalid_page(int nid, struct page *page,
 
 	while (npages--) {
 		pfn = page_to_pfn(page);
-		__init_reserved_page_zone(pfn, nid);
+		__init_page_from_nid(pfn, nid);
 		free_reserved_page(page);
 		page++;
 	}
diff --git a/mm/internal.h b/mm/internal.h
index b07550db2bfd..5c0b81abbc1b 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1465,7 +1465,7 @@ static inline bool pte_needs_soft_dirty_wp(struct vm_area_struct *vma, pte_t pte
 
 void __meminit __init_single_page(struct page *page, unsigned long pfn,
 				unsigned long zone, int nid);
-void __meminit __init_reserved_page_zone(unsigned long pfn, int nid);
+void __meminit __init_page_from_nid(unsigned long pfn, int nid);
 
 /* shrinker related functions */
 unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg,
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 133640a93d1d..f9a02b1e2fce 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -653,7 +653,7 @@ static inline void fixup_hashdist(void) {}
 /*
  * Initialize a reserved page unconditionally, finding its zone first.
  */
-void __meminit __init_reserved_page_zone(unsigned long pfn, int nid)
+void __meminit __init_page_from_nid(unsigned long pfn, int nid)
 {
 	pg_data_t *pgdat;
 	int zid;
@@ -733,7 +733,7 @@ static void __meminit init_reserved_page(unsigned long pfn, int nid)
 	if (early_page_initialised(pfn, nid))
 		return;
 
-	__init_reserved_page_zone(pfn, nid);
+	__init_page_from_nid(pfn, nid);
 }
 #else
 static inline void pgdat_set_deferred_range(pg_data_t *pgdat) {}
-- 
2.47.2



  reply	other threads:[~2025-02-25  8:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  8:30 [PATCH mm-unstable 0/2] mm_init: rename *init_reserved_page* functions Mike Rapoport
2025-02-25  8:30 ` Mike Rapoport [this message]
2025-02-26  1:52   ` [PATCH mm-unstable 1/2] mm/mm_init: rename __init_reserved_page_zone to __init_page_from_nid Wei Yang
2025-02-25  8:30 ` [PATCH mm-unstable 2/2] mm/mm_init: rename init_reserved_page to init_deferred_page Mike Rapoport
2025-02-26  1:54   ` Wei Yang

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=20250225083017.567649-2-rppt@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=fvdl@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=richard.weiyang@gmail.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