Re: [RFC PATCH] cgroup/pids: Make pids.events notifications affine to pids.max
From: Tejun Heo
Date: Mon Dec 02 2019 - 14:11:08 EST
Hello,
On Thu, Nov 28, 2019 at 06:26:12PM +0100, Michal Koutný wrote:
> Currently, when pids.max limit is breached in the hierarchy, the event
> is counted and reported in the cgroup where the forking task resides.
>
> The proper hierarchical behavior is to count and report the event in the
> cgroup whose limit is being exceeded. Apply this behavior in the default
> hierarchy.
>
> Reasons for RFC:
>
> 1) If anyone has adjusted their readings to this behavior, this is a BC
> break.
>
> 2) This solves no reported bug, just a spotted inconsistency.
>
> 3) One step further would be to distinguish pids.events and
> pids.events.local for proper hierarchical counting. (The current
> behavior wouldn't match neither though.)
Yeah this is incosistent with memcg but there max / high events are
essentially useless because that doesn't indicate actual limit breach.
Both events are interesting - which cgroup's limit was reached and who
suffered because of that.
So, maybe sth like the following?
1. Make max event propagate hierarchically. This is a behavior change
but also an obvious bug fix. Given that internal cgroups don't
have processes in cgroup2, maybe it's safe enough?
2. Add another (hierarchical, of course) event which counts the number
of fork rejects. I can't think of a good name. Any ideas?
Thanks.
--
tejun