Re: [PATCH] mm: vmscan: restore incremental cgroup iteration
From: Michal Koutný
Date: Fri May 24 2024 - 12:35:30 EST
Hello.
On Tue, May 14, 2024 at 04:26:41PM GMT, Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
> The shared iterator state is maintaned inside the target cgroup, so
> fair and incremental walks are performed during both global reclaim
> and cgroup limit reclaim of complex subtrees.
Here it sounds like same fairness is maintained...
> static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc)
..
> + * persists across invocations. This strikes a balance between
> + * fairness and allocation latency.
..but here you write about balance between fairness and allocation.
IIUC, this spreads reclaim (of whole subtree) over longer time when more
events may affect the state of memory (e.g. more allocations), so
fairness would be "different". So the statement from code comment is
correct, right?
(I was also wondering how does this affect determinism of reclaim and
whether some chaotic or oscillatory patterns aren't possible but I guess
that needn't to be considered given it used to work before
1ba6fc9af35b.)
Thanks,
Michal
Attachment:
signature.asc
Description: PGP signature