mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm: use zone->present_pages instead of zone->managed_pages where appropriate
Now we have zone->managed_pages for "pages managed by the buddy system in the zone", so replace zone->present_pages with zone->managed_pages if what the user really wants is number of allocatable pages. Signed-off-by: Jiang Liu <[email protected]> Cc: Wen Congyang <[email protected]> Cc: David Rientjes <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Maciej Rutecki <[email protected]> Cc: Chris Clayton <[email protected]> Cc: "Rafael J . Wysocki" <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Jianguo Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f7210e6c4a
commit
b40da04946
3 changed files with 24 additions and 24 deletions
|
|
@ -142,7 +142,7 @@ int calculate_normal_threshold(struct zone *zone)
|
|||
* 125 1024 10 16-32 GB 9
|
||||
*/
|
||||
|
||||
mem = zone->present_pages >> (27 - PAGE_SHIFT);
|
||||
mem = zone->managed_pages >> (27 - PAGE_SHIFT);
|
||||
|
||||
threshold = 2 * fls(num_online_cpus()) * (1 + fls(mem));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue