Re: [PATCH v3 2/3] selftests: cgroup: refactor proactive reclaim code to reclaim_until()

From: Roman Gushchin
Date: Fri Dec 02 2022 - 17:21:11 EST


On Fri, Dec 02, 2022 at 03:15:11AM +0000, Yosry Ahmed wrote:
> 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.
>
> Signed-off-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx>
> Suggested-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>

Reviewed-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>

Thanks!