mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
mm: discard free cma pages in boost_eligible calculations
Considering the free cma pages in boost_eligible can give wrong results.
Subtract them.
Change-Id: I5dd3e408bcaf109d51066323686d8d1930093e3b
Fixes: 09d35acf52cb ("mm: ignore boosting for min watermark")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
parent
05ebc8f08c
commit
2f2da11aec
1 changed files with 2 additions and 1 deletions
|
|
@ -2381,7 +2381,8 @@ static bool boost_eligible(struct zone *z)
|
|||
high_wmark = z->_watermark[WMARK_HIGH];
|
||||
reclaim_eligible = zone_page_state_snapshot(z, NR_ZONE_INACTIVE_FILE) +
|
||||
zone_page_state_snapshot(z, NR_ZONE_ACTIVE_FILE);
|
||||
free_pages = zone_page_state(z, NR_FREE_PAGES);
|
||||
free_pages = zone_page_state(z, NR_FREE_PAGES) -
|
||||
zone_page_state(z, NR_FREE_CMA_PAGES);
|
||||
threshold = high_wmark + (2 * mult_frac(high_wmark,
|
||||
watermark_boost_factor, 10000));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue