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 <[email protected]>
---
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
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 <[email protected]>
Looks sensible to me.
Acked-by: Dave Hansen <[email protected]
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 <[email protected]>
Acked-by: David Rientjes <[email protected]>
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 <[email protected]>
This looks sane to me.
Reviewed-by: Jesper Juhl <[email protected]>
--
Jesper Juhl <[email protected]> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.