mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mm: optimize pfn calculation in online_page()
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: Dave Hansen <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Wu Fengguang <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Christoph Lameter <[email protected]> Acked-by: David Rientjes <[email protected]> Reviewed-by: Jesper Juhl <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
67954fe957
commit
584208e6b4
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue