Re: [PATCH v2] cgroup: Add pids controller event when fork fails because of pid limit

From: Tejun Heo
Date: Tue Jun 21 2016 - 12:34:28 EST


Hello,

On Wed, Jun 22, 2016 at 02:07:09AM +1000, Aleksa Sarai wrote:
> Why are we logging this? Isn't the pids.events file enough
> information? I feel like you could remove a lot of logic if you don't
> log this.

I think logging it is a good idea. People aren't used to think about
the pids controller when fork fails and I've seen people getting
royally confused by it. Also, if fork is being rejected on the right
(or wrong) cgroup, investigating why that's happening can be extremely
challenging (e.g. can't login).

> And even if we do end up logging it, why have the boolean flag (the
> counter always increases, just log if the counter is currently 0 and
> you're incrementing it).

Ah, that's true. I like the fact that the warning message will be
printed after each change to the limit but yeah going off of zero
events_limit count should be fine too.

Thanks.

--
tejun