Re: [PATCH 0/1] Fix vmstat_percpu incorrect subtraction after reparent

From: Michal Koutný
Date: Fri Mar 24 2023 - 13:14:47 EST


On Mon, Mar 20, 2023 at 03:06:47AM +0000, Cai Xinchen <caixinchen1@xxxxxxxxxx> wrote:
> There are two problems left:
>
> root
> / \
> A B
> / \ \
> C E D
>
> 1. In some case of reparent, some page cache may be used by other memcg
> D but it charges to the parent memcg A of dying memcg E. D is getting
> away with using the page for free while A is taxed.

Note that A is (effectively) taxed even before E is removed due to
hierarchical nature of charging. Then what you describe transforms into
"well-known" problem of shared charging (with not well-known solution
:-/).

HTH,
Michal

Attachment: signature.asc
Description: PGP signature