> On Jan 4, 2019, at 17:04, Michal Hocko <mhocko@xxxxxxxxxx> wrote: > > This is a natural side effect of shared memory, I am afraid. Isolated > memory cgroups should limit any shared resources to bare minimum. You > will get "who touches first gets charged" behavior otherwise and that is > not really deterministic. I don’t quite understand your comment. I think the current behavior for the ext4_inode_cachep slab family is just “who touches first gets charged”, and later users of the same file from a different mem cgroup can benefit from the cache, keep it from being released, but doesn’t get charged.