Skip to contentSkip to conversation

Remove __online_page_set_limits()

PATCH In review Souptick Joarder 5 participants 12 messages Sep 7, 2019 – Sep 10, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover Remove __online_page_set_limits()

__online_page_set_limits() is a dummy function and an extra call to this can be avoided.

As both of the callers are now removed, __online_page_set_limits() can be removed permanently.

Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits() xen/ballon: Avoid calling dummy function __online_page_set_limits() mm/memory_hotplug.c: Remove __online_page_set_limits()

 drivers/hv/hv_balloon.c        | 1 -
 drivers/xen/balloon.c          | 1 -
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 4 files changed, 8 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 hv_ballon: Avoid calling dummy function __online_page_set_limits()

__online_page_set_limits() is a dummy function and an extra call to this function can be avoided.

---
 drivers/hv/hv_balloon.c | 1 -
 1 file changed, 1 deletion(-)
drivers/hv/hv_balloon.c +0 -1
index 6fb4ea5..9bab443 100644
@@ -680,7 +680,6 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
 		__ClearPageOffline(pg);
 
 	/* This frame is currently backed; online the page. */
-	__online_page_set_limits(pg);
 	__online_page_increment_counters(pg);
 	__online_page_free(pg);
 
Signature · 1 line
1.9.1
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] hv_ballon: Avoid calling dummy function __online_page_set_limits()

Quoted 14 lines · Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this function can be avoided.

---
 drivers/hv/hv_balloon.c | 1 -
 1 file changed, 1 deletion(-)
drivers/hv/hv_balloon.c +0 -0
index 6fb4ea5..9bab443 100644

drivers/hv/hv_balloon.c static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg) · line 685

Quoted 7 lines
drivers/hv/hv_balloon.c +0 -1
@@ -680,7 +680,6 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
 		__ClearPageOffline(pg);
 
 	/* This frame is currently backed; online the page. */
-	__online_page_set_limits(pg);
 	__online_page_increment_counters(pg);
 	__online_page_free(pg);
 
Signature · 3 lines
Thanks,

David / dhildenb
#3 lore raw

PATCH 2/3 xen/ballon: Avoid calling dummy function __online_page_set_limits()

In reply to Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this function can be avoided.

---
 drivers/xen/balloon.c | 1 -
 1 file changed, 1 deletion(-)
drivers/xen/balloon.c +0 -1
index 4e11de6..05b1f7e 100644
@@ -376,7 +376,6 @@ static void xen_online_page(struct page *page, unsigned int order)
 	mutex_lock(&balloon_mutex);
 	for (i = 0; i < size; i++) {
 		p = pfn_to_page(start_pfn + i);
-		__online_page_set_limits(p);
 		__SetPageOffline(p);
 		__balloon_append(p);
 	}
Signature · 1 line
1.9.1
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] xen/ballon: Avoid calling dummy function __online_page_set_limits()

In reply to Souptick Joarder
Quoted 14 lines · Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this function can be avoided.

---
 drivers/xen/balloon.c | 1 -
 1 file changed, 1 deletion(-)
drivers/xen/balloon.c +0 -0
index 4e11de6..05b1f7e 100644

drivers/xen/balloon.c static void xen_online_page(struct page *page, unsigned int order) · line 381

Quoted 7 lines
drivers/xen/balloon.c +0 -1
@@ -376,7 +376,6 @@ static void xen_online_page(struct page *page, unsigned int order)
 	mutex_lock(&balloon_mutex);
 	for (i = 0; i < size; i++) {
 		p = pfn_to_page(start_pfn + i);
-		__online_page_set_limits(p);
 		__SetPageOffline(p);
 		__balloon_append(p);
 	}
Signature · 3 lines
Thanks,

David / dhildenb
#6 lore raw

PATCH 3/3 mm/memory_hotplug.c: Remove __online_page_set_limits()

In reply to Souptick Joarder

As both the callers of this dummy __online_page_set_limits() is removed, this can be removed permanently.

---
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 2 files changed, 6 deletions(-)
include/linux/memory_hotplug.h +0 -1
index f46ea71..8ee3a2a 100644
@@ -105,7 +105,6 @@ extern unsigned long __offline_isolated_pages(unsigned long start_pfn,
 extern int set_online_page_callback(online_page_callback_t callback);
 extern int restore_online_page_callback(online_page_callback_t callback);
 
-extern void __online_page_set_limits(struct page *page);
 extern void __online_page_increment_counters(struct page *page);
 extern void __online_page_free(struct page *page);
 
mm/memory_hotplug.c +0 -5
index c73f099..dc0118f 100644
@@ -604,11 +604,6 @@ int restore_online_page_callback(online_page_callback_t callback)
 }
 EXPORT_SYMBOL_GPL(restore_online_page_callback);
 
-void __online_page_set_limits(struct page *page)
-{
-}
-EXPORT_SYMBOL_GPL(__online_page_set_limits);
-
 void __online_page_increment_counters(struct page *page)
 {
 	adjust_managed_page_count(page, 1);
Signature · 1 line
1.9.1
Reviewed-by on v1 3/3
#7 lore raw

Re: [PATCH 3/3] mm/memory_hotplug.c: Remove __online_page_set_limits()

Quoted 28 lines · Souptick Joarder

As both the callers of this dummy __online_page_set_limits() is removed, this can be removed permanently.

---
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 2 files changed, 6 deletions(-)
include/linux/memory_hotplug.h +0 -1
index f46ea71..8ee3a2a 100644
@@ -105,7 +105,6 @@ extern unsigned long __offline_isolated_pages(unsigned long start_pfn,
 extern int set_online_page_callback(online_page_callback_t callback);
 extern int restore_online_page_callback(online_page_callback_t callback);
 
-extern void __online_page_set_limits(struct page *page);
 extern void __online_page_increment_counters(struct page *page);
 extern void __online_page_free(struct page *page);
 
mm/memory_hotplug.c +0 -0
index c73f099..dc0118f 100644
@@ -604,11 +604,6 @@ int restore_online_page_callback(online_page_callback_t callback)
 }

mm/memory_hotplug.c int restore_online_page_callback(online_page_callback_t callback) · line 609

Quoted 10 lines
mm/memory_hotplug.c +0 -5
 EXPORT_SYMBOL_GPL(restore_online_page_callback);
 
-void __online_page_set_limits(struct page *page)
-{
-}
-EXPORT_SYMBOL_GPL(__online_page_set_limits);
-
 void __online_page_increment_counters(struct page *page)
 {
 	adjust_managed_page_count(page, 1);
Signature · 3 lines
Thanks,

David / dhildenb
Acked-by on the v1 series
#8 lore raw
In reply to Souptick Joarder
Quoted 11 lines · Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this can be avoided.

As both of the callers are now removed, __online_page_set_limits() can be removed permanently.

Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits() xen/ballon: Avoid calling dummy function __online_page_set_limits() mm/memory_hotplug.c: Remove __online_page_set_limits()

Quoted 5 lines
 drivers/hv/hv_balloon.c        | 1 -
 drivers/xen/balloon.c          | 1 -
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 4 files changed, 8 deletions(-)

To the whole series

Thanks!

Signature · 2 lines
Michal Hocko
SUSE Labs
#9 lore raw
In reply to Souptick Joarder
Quoted 11 lines · Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this can be avoided.

As both of the callers are now removed, __online_page_set_limits() can be removed permanently.

Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits() xen/ballon: Avoid calling dummy function __online_page_set_limits() mm/memory_hotplug.c: Remove __online_page_set_limits()

Quoted 5 lines
 drivers/hv/hv_balloon.c        | 1 -
 drivers/xen/balloon.c          | 1 -
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 4 files changed, 8 deletions(-)

Do we really need 3 separate patches to remove 8 lines of code?

Signature · 1 line
 Kirill A. Shutemov
#10 lore raw
Quoted 13 lines · Kirill A. Shutemov
Quoted 11 lines · Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this can be avoided.

As both of the callers are now removed, __online_page_set_limits() can be removed permanently.

Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits() xen/ballon: Avoid calling dummy function __online_page_set_limits() mm/memory_hotplug.c: Remove __online_page_set_limits()

Quoted 7 lines
Quoted 5 lines
 drivers/hv/hv_balloon.c        | 1 -
 drivers/xen/balloon.c          | 1 -
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 4 files changed, 8 deletions(-)

Do we really need 3 separate patches to remove 8 lines of code?

I prefer to split into series of 3 which looks more clean. But I am ok with other option.
Would you like to merge into single one ?

#11 lore raw
Quoted 20 lines · Souptick Joarder
Quoted 19 lines · Kirill A. Shutemov
Quoted 16 lines · Souptick Joarder

__online_page_set_limits() is a dummy function and an extra call to this can be avoided.

As both of the callers are now removed, __online_page_set_limits() can be removed permanently.

Souptick Joarder (3):
hv_ballon: Avoid calling dummy function __online_page_set_limits() xen/ballon: Avoid calling dummy function __online_page_set_limits() mm/memory_hotplug.c: Remove __online_page_set_limits()

 drivers/hv/hv_balloon.c        | 1 -
 drivers/xen/balloon.c          | 1 -
 include/linux/memory_hotplug.h | 1 -
 mm/memory_hotplug.c            | 5 -----
 4 files changed, 8 deletions(-)
Quoted 6 lines
Quoted 1 line

Do we really need 3 separate patches to remove 8 lines of code?

I prefer to split into series of 3 which looks more clean. But I am ok with other option.
Would you like to merge into single one ?

If you have to resend, you could squash them into one. If not, I think this is okay ...

Signature · 3 lines
Thanks,

David / dhildenb