Re: [PATCH v2] memcg: css_tryget_online cleanups

From: Michal Hocko
Date: Wed Mar 04 2020 - 07:32:22 EST


On Tue 03-03-20 15:49:41, Shakeel Butt wrote:
> On Tue, Mar 3, 2020 at 1:32 AM Michal Hocko <mhocko@xxxxxxxxxx> wrote:
[...]
> > Could you be more specific about the swap in case please?
> >
>
> With swap accounting enabled, if the memcg of the swapped out page is
> not online then the memcg extracted from the given 'mm' will be
> charged and if 'mm' is NULL then root memcg will be charged. However I
> could not find a code path where the given 'mm' will be NULL for
> swap-in case.

Yes, this is my understanding as well. All the paths are getting mm from
a vma AFAICS. This is a valuable information for the changelog.

--
Michal Hocko
SUSE Labs