Re: [PATCH 0/4] exit: Make unlikely case in mm_update_next_owner() more scalable

From: Eric W. Biederman
Date: Thu Apr 26 2018 - 12:22:51 EST


Michal Hocko <mhocko@xxxxxxxxxx> writes:

> I've had a patch to remove owner few years back. It needed some work
> to finish but maybe that would be a better than try to make
> non-scalable thing suck less.

I have a question. Would it be reasonable to just have a mm->memcg?
That would appear to be the simplest solution to the problem.

That would require failing migration between memory cgroups if you are
not moving all of processes/threads that have a given mm_struct. That
should not be a huge restriction as typically it is only threads that
share a mm. Further the check should be straigh forward: counting the
number of threads and verifying the count matches the count on the
mm_struct.

Eric