Suren Baghdasaryan 64c9f8ced0
msm: kgsl: Stop slab shrinker when no more pages can be reclaimed
do_shrink_slab() scans each shrinker in batches of at most
batch_size (128) pages at a time until total_scan pages are
scanned or until shrinker returns SHRINK_STOP. Under heavy
memory pressure total_scan can be large (in thousands) and
kgsl_pool_shrink_scan_objects() ends up returning 0 after
all pages that were reclaimable are reclaimed. This results in
multiple calls to kgsl_pool_shrink_scan_objects() that do not
reclaim any memory. To prevent this kgsl_pool_shrink_scan_objects()
is modified to return SHRINK_STOP as soon as no more memory can
be reclaimed.

Bug: 69931996
Test: tested using alloc-stress with additional traces

Change-Id: Ia48fc2c0d888c54ec9642c0b0962a70ca3cb4c5e
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:54:12 +07:00
..
2022-01-27 09:07:33 +01:00
2022-01-27 09:07:33 +01:00
2022-04-06 13:18:26 +07:00
2022-04-06 13:18:04 +07:00
2022-03-02 15:28:01 +01:00
2022-03-16 14:10:02 +00:00