Re: [PATCH 0/1] exit: kill signal_struct->quick_threads
From: Oleg Nesterov
Date: Mon Jun 17 2024 - 14:39:45 EST
On 06/15, Eric W. Biederman wrote:
>
> Oleg Nesterov <oleg@xxxxxxxxxx> writes:
>
> > Eric, do you agree with this patch or not?
>
> I really don't.
OK, I won't insist.
If nothing else, I failed to remove the usage of signal->live in cgroup.c
and this patch (supposed to be a cleanup) can slightly affect the cgroup
iterators.
But. You didn't mention cgroups, so lets forget cgroups to simplify this
discussion.
So. I would like to see at least ONE _technical_ objection to this patch.
Once again, I was worried about this cleanup from the very beginning, that is
why I asked you to review. Thanks for taking a look. But could you help me to
understand what exactly you don't like?
> I think skipping some work if SIGNAL_GROUP_EXIT is already
> set is not necessarily wrong.
OK, so you seem to agree with this part after all.
> I think we need the quick_threads count,
And so far I fail to understand this,
> and related cleanups.
> I was hoping to be able to post a patchset with this reply
> to explain things, but it looks like that is still a couple
> of days off.
OK. This looks as if I need to wait for your cleanups to understand
why do we need quick_threads even if we move atomic_dec_and_test(live)
to the very start of do_exit().
Okay, I'll have to wait.
And. To me the current placement of atomic_dec_and_test(signal->live)
looks "random" no matter what. Even if we forget about cgroups.
> Where I was going, and where I think we should go with quick_threads is
> an exit path that is much easier to reason about and maintain. But the
> decrement needs to move into the same code that sets SIGNAL_GROUP_EXIT.
> Which makes it something very different from signal->live.
Still can't understand, but see above. Quite possibly I missed something.
I will wait for your patchset.
Oleg.