Hello. On Fri, Oct 27, 2023 at 05:30:04PM +0800, Ruifeng Su <suruifeng1@xxxxxxxxxx> wrote: > The test result shows that the program frequently sync iCache & dcache. > As a result, > the number of anon pages requested by the program cannot increase. memory.high can be a tar-pit (instead of OOM). > This patch changes the behavior of retry recycling. What is behavior of your program after the change? And what behavior do you expect? > @@ -2616,7 +2615,7 @@ void mem_cgroup_handle_over_high(gfp_t gfp_mask) > * memory.high, we want to encourage that rather than doing allocator > * throttling. > */ > - if (nr_reclaimed || nr_retries--) { > + if (nr_reclaimed >= (in_retry ? SWAP_CLUSTER_MAX : nr_pages)) { So this reads better as if (nr_reclaimed >= to_reclaim) > in_retry = true; > goto retry_reclaim; > } So it would unnecessarily overreclaim in some cases. Regards, Michal
Attachment:
signature.asc
Description: PGP signature