diff options
author | Yosry Ahmed <[email protected]> | 2022-12-02 03:15:11 +0000 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-12-11 18:12:19 -0800 |
commit | e5d64edac64531375716fabe35c9e0a502ca2894 (patch) | |
tree | 776a125785895f33697d5ab7f8a7cc26b97d551b /lib/mpi/mpi-mod.c | |
parent | adb8213014b25c7f1d75d5b219becaadcd695efb (diff) |
selftests: cgroup: refactor proactive reclaim code to reclaim_until()
Refactor the code that drives writing to memory.reclaim (retrying, error
handling, etc) from test_memcg_reclaim() to a helper called
reclaim_until(), which proactively reclaims from a memcg until its usage
reaches a certain value.
While we are at it, refactor and simplify the reclaim loop.
This will be used in a following patch in another test.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yosry Ahmed <[email protected]>
Suggested-by: Roman Gushchin <[email protected]>
Reviewed-by: Roman Gushchin <[email protected]>
Cc: Chris Down <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Muchun Song <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Vasily Averin <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Yu Zhao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions