mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge "mm: vmscan: support complete shrinker reclaim"
This commit is contained in:
commit
f4de4c753b
1 changed files with 5 additions and 1 deletions
|
|
@ -471,6 +471,10 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
|
|||
long batch_size = shrinker->batch ? shrinker->batch
|
||||
: SHRINK_BATCH;
|
||||
long scanned = 0, next_deferred;
|
||||
long min_cache_size = batch_size;
|
||||
|
||||
if (current_is_kswapd())
|
||||
min_cache_size = 0;
|
||||
|
||||
if (!(shrinker->flags & SHRINKER_NUMA_AWARE))
|
||||
nid = 0;
|
||||
|
|
@ -550,7 +554,7 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
|
|||
* scanning at high prio and therefore should try to reclaim as much as
|
||||
* possible.
|
||||
*/
|
||||
while (total_scan >= batch_size ||
|
||||
while (total_scan > min_cache_size ||
|
||||
total_scan >= freeable) {
|
||||
unsigned long ret;
|
||||
unsigned long nr_to_scan = min(batch_size, total_scan);
|
||||
|
|
|
|||
Loading…
Reference in a new issue