Linux-mm Archive on
 help / color / Atom feed
* [patch 076/158] mm/memory_hotplug: export generic_online_page()
@ 2019-12-01  1:53 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2019-12-01  1:53 UTC (permalink / raw)
  To: akpm, cai, dan.j.williams, david, haiyangz, kys, linux-mm,
	mhocko, mm-commits, osalvador, pasha.tatashin, richard.weiyang,
	sashal, sthemmin, torvalds

From: David Hildenbrand <>
Subject: mm/memory_hotplug: export generic_online_page()

Patch series "mm/memory_hotplug: Export generic_online_page()".

Let's replace the __online_page...() functions by generic_online_page().
Hyper-V only wants to delay the actual onlining of un-backed pages, so we
can simpy re-use the generic function.

This patch (of 3):

Let's expose generic_online_page() so online_page_callback users can
simply fall back to the generic implementation when actually deciding to
online the pages.

Signed-off-by: David Hildenbrand <>
Acked-by: Michal Hocko <>
Cc: Oscar Salvador <>
Cc: Pavel Tatashin <>
Cc: Dan Williams <>
Cc: Wei Yang <>
Cc: Qian Cai <>
Cc: Haiyang Zhang <>
Cc: "K. Y. Srinivasan" <>
Cc: Sasha Levin <>
Cc: Stephen Hemminger <>
Signed-off-by: Andrew Morton <>

 include/linux/memory_hotplug.h |    1 +
 mm/memory_hotplug.c            |    5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/include/linux/memory_hotplug.h~mm-memory_hotplug-export-generic_online_page
+++ a/include/linux/memory_hotplug.h
@@ -102,6 +102,7 @@ extern unsigned long __offline_isolated_
 typedef void (*online_page_callback_t)(struct page *page, unsigned int order);
+extern void generic_online_page(struct page *page, unsigned int order);
 extern int set_online_page_callback(online_page_callback_t callback);
 extern int restore_online_page_callback(online_page_callback_t callback);
--- a/mm/memory_hotplug.c~mm-memory_hotplug-export-generic_online_page
+++ a/mm/memory_hotplug.c
@@ -49,8 +49,6 @@
  * and restore_online_page_callback() for generic callback restore.
-static void generic_online_page(struct page *page, unsigned int order);
 static online_page_callback_t online_page_callback = generic_online_page;
 static DEFINE_MUTEX(online_page_callback_lock);
@@ -617,7 +615,7 @@ void __online_page_free(struct page *pag
-static void generic_online_page(struct page *page, unsigned int order)
+void generic_online_page(struct page *page, unsigned int order)
 	kernel_map_pages(page, 1 << order, 1);
 	__free_pages_core(page, order);
@@ -627,6 +625,7 @@ static void generic_online_page(struct p
 		totalhigh_pages_add(1UL << order);
 static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages,
 			void *arg)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01  1:53 [patch 076/158] mm/memory_hotplug: export generic_online_page() akpm

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone