Re: [PATCH RFC] net: memcg accounting for veth devices

From: Luis Chamberlain
Date: Wed Mar 02 2022 - 16:52:30 EST


On Wed, Mar 02, 2022 at 08:43:54AM -0600, Eric W. Biederman wrote:
> Luis Chamberlain <mcgrof@xxxxxxxxxx> writes:
>
> > On Tue, Mar 01, 2022 at 02:50:06PM -0600, Eric W. Biederman wrote:
> >> I really have not looked at this pids controller.
> >>
> >> So I am not certain I understand your example here but I hope I have
> >> answered your question.
> >
> > During experimentation with the above stress-ng test case, I saw tons
> > of thread just waiting to do exit:
>
> You increment the count of concurrent threads after a no return function
> in do_exit. Since the increment is never reached the count always goes
> down and eventually the warning prints.
>
> > diff --git a/kernel/exit.c b/kernel/exit.c
> > index 80c4a67d2770..653ca7ebfb58 100644
> > --- a/kernel/exit.c
> > +++ b/kernel/exit.c
> > @@ -881,6 +894,9 @@ void __noreturn do_exit(long code)
> >
> > lockdep_free_task(tsk);
> > do_task_dead();
>
> The function do_task_dead never returns.
>
> > +
> > + atomic_inc(&exit_concurrent_max);
> > + wake_up(&exit_wq);
> > }
> > EXPORT_SYMBOL_GPL(do_exit);

Doh thanks!

Luis