diff options
| author | Chris Wilson <[email protected]> | 2017-09-06 16:19:26 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-09-06 17:27:24 -0700 |
| commit | d460acb5bdffc19b492b70b8f416c24dc03c474e (patch) | |
| tree | 10ec3900fd2912bf11143cc586ba5842527f7a00 /tools | |
| parent | ce6fa91b93630396ca220c33dd38ffc62686d499 (diff) | |
mm: track actual nr_scanned during shrink_slab()
Some shrinkers may only be able to free a bunch of objects at a time,
and so free more than the requested nr_to_scan in one pass.
Whilst other shrinkers may find themselves even unable to scan as many
objects as they counted, and so underreport. Account for the extra
freed/scanned objects against the total number of objects we intend to
scan, otherwise we may end up penalising the slab far more than
intended. Similarly, we want to add the underperforming scan to the
deferred pass so that we try harder and harder in future passes.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Chris Wilson <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions