* [PATCH 1/3] mm: Optimize pfn calculation in online_page()
@ 2011-03-28 9:23 Daniel Kiper
2011-03-28 15:24 ` Dave Hansen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Kiper @ 2011-03-28 9:23 UTC (permalink / raw)
To: ian.campbell, akpm, andi.kleen, haicheng.li, fengguang.wu, jeremy,
konrad.wilk, dan.magenheimer, v.tolstov, pasik, dave, wdauchy,
rientjes, xen-devel, linux-kernel, linux-mm
If CONFIG_FLATMEM is enabled pfn is calculated in online_page()
more than once. It is possible to optimize that and use value
established at beginning of that function.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
---
mm/memory_hotplug.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 321fc74..f0651ae 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -375,7 +375,7 @@ void online_page(struct page *page)
#endif
#ifdef CONFIG_FLATMEM
- max_mapnr = max(page_to_pfn(page), max_mapnr);
+ max_mapnr = max(pfn, max_mapnr);
#endif
ClearPageReserved(page);
--
1.5.6.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] mm: Optimize pfn calculation in online_page()
2011-03-28 9:23 [PATCH 1/3] mm: Optimize pfn calculation in online_page() Daniel Kiper
@ 2011-03-28 15:24 ` Dave Hansen
2011-03-28 22:41 ` David Rientjes
2011-03-28 22:44 ` Jesper Juhl
2 siblings, 0 replies; 4+ messages in thread
From: Dave Hansen @ 2011-03-28 15:24 UTC (permalink / raw)
To: Daniel Kiper
Cc: ian.campbell, akpm, andi.kleen, haicheng.li, fengguang.wu, jeremy,
konrad.wilk, dan.magenheimer, v.tolstov, pasik, wdauchy, rientjes,
xen-devel, linux-kernel, linux-mm
On Mon, 2011-03-28 at 11:23 +0200, Daniel Kiper wrote:
> If CONFIG_FLATMEM is enabled pfn is calculated in online_page()
> more than once. It is possible to optimize that and use value
> established at beginning of that function.
>
> Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Looks sensible to me.
Acked-by: Dave Hansen <dave@linux.vnet.ibm.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] mm: Optimize pfn calculation in online_page()
2011-03-28 9:23 [PATCH 1/3] mm: Optimize pfn calculation in online_page() Daniel Kiper
2011-03-28 15:24 ` Dave Hansen
@ 2011-03-28 22:41 ` David Rientjes
2011-03-28 22:44 ` Jesper Juhl
2 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2011-03-28 22:41 UTC (permalink / raw)
To: Daniel Kiper
Cc: ian.campbell, akpm, andi.kleen, haicheng.li, fengguang.wu, jeremy,
konrad.wilk, dan.magenheimer, v.tolstov, pasik, dave, wdauchy,
xen-devel, linux-kernel, linux-mm
On Mon, 28 Mar 2011, Daniel Kiper wrote:
> If CONFIG_FLATMEM is enabled pfn is calculated in online_page()
> more than once. It is possible to optimize that and use value
> established at beginning of that function.
>
> Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Acked-by: David Rientjes <rientjes@google.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] mm: Optimize pfn calculation in online_page()
2011-03-28 9:23 [PATCH 1/3] mm: Optimize pfn calculation in online_page() Daniel Kiper
2011-03-28 15:24 ` Dave Hansen
2011-03-28 22:41 ` David Rientjes
@ 2011-03-28 22:44 ` Jesper Juhl
2 siblings, 0 replies; 4+ messages in thread
From: Jesper Juhl @ 2011-03-28 22:44 UTC (permalink / raw)
To: Daniel Kiper
Cc: ian.campbell, akpm, andi.kleen, haicheng.li, fengguang.wu, jeremy,
konrad.wilk, dan.magenheimer, v.tolstov, pasik, dave, wdauchy,
rientjes, xen-devel, linux-kernel, linux-mm
On Mon, 28 Mar 2011, Daniel Kiper wrote:
> If CONFIG_FLATMEM is enabled pfn is calculated in online_page()
> more than once. It is possible to optimize that and use value
> established at beginning of that function.
>
> Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
This looks sane to me.
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-28 22:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 9:23 [PATCH 1/3] mm: Optimize pfn calculation in online_page() Daniel Kiper
2011-03-28 15:24 ` Dave Hansen
2011-03-28 22:41 ` David Rientjes
2011-03-28 22:44 ` Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).