Re: [PATCH v2 4/5] memcg: use high_work for remote charges

From: Muchun Song

Date: Fri Oct 30 2026 - 20:49:09 EST




> On Oct 31, 2026, at 04:54, Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote:
>
> Some charges go to a cgroup outside the current mm's cgroup and its
> ancestors. The high handler uses current->mm, so it cannot handle these
> overages. Filesystem notifications and remote page faults can take
> this path.
>
> Use mm_match_cgroup() before checking the high limits. If it does not
> match, use high_work instead of recording task overage or doing
> synchronous reclaim and throttling. Charges to the current mm's cgroup
> or one of its ancestors keep their current handling. Tasks without an
> mm also use the worker.
>
> Like kernel threads, remote chargers skip memory.swap.high throttling
> and its high-event reporting, and a fast allocator can outrun the worker.
> The memory.max and memory.swap.max checks stay the same.
>
> Suggested-by: Tejun Heo <tj@xxxxxxxxxx>
> Signed-off-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>
> Acked-by: Michal Hocko <mhocko@xxxxxxxx>

Acked-by: Muchun Song <muchun.song@xxxxxxxxx>

Thanks.