mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
mm: ignore boosting for min watermark
Ignore boosting for min watermark for __GFP_ATOMIC, ALLOC_HIGH and ALLOC_HARDER allocation requests. Of the others, this helps in avoiding the atomic allocation failures. Change-Id: I41dcc71ed37b7a1d2093d13f40e82c7750642e39 Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
parent
7fcd8c796f
commit
05ebc8f08c
1 changed files with 14 additions and 0 deletions
|
|
@ -3770,6 +3770,20 @@ retry:
|
|||
}
|
||||
|
||||
mark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK);
|
||||
/*
|
||||
* Allow high, atomic, harder order-0 allocation requests
|
||||
* to skip the ->watermark_boost for min watermark check.
|
||||
* In doing so, check for:
|
||||
* 1) ALLOC_WMARK_MIN - Allow to wake up kswapd in the
|
||||
* slow path.
|
||||
* 2) ALLOC_HIGH - Allow high priority requests.
|
||||
* 3) ALLOC_HARDER - Allow (__GFP_ATOMIC && !__GFP_NOMEMALLOC),
|
||||
* of the others.
|
||||
*/
|
||||
if (unlikely(!order && (alloc_flags & ALLOC_WMARK_MIN) &&
|
||||
(alloc_flags & (ALLOC_HARDER | ALLOC_HIGH)))) {
|
||||
mark = zone->_watermark[WMARK_MIN];
|
||||
}
|
||||
if (!zone_watermark_fast(zone, order, mark,
|
||||
ac_classzone_idx(ac), alloc_flags)) {
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue