[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150314202059.GA11012@redhat.com>
Date: Sat, 14 Mar 2015 21:20:59 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Josh Triplett <josh@...htriplett.org>
Cc: Thiago Macieira <thiago.macieira@...el.com>,
Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Lutomirski <luto@...capital.net>,
Ingo Molnar <mingo@...hat.com>,
Kees Cook <keescook@...omium.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
"H. Peter Anvin" <hpa@...or.com>, Rik van Riel <riel@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Michael Kerrisk <mtk.manpages@...il.com>,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-fsdevel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 6/6] clone4: Introduce new CLONE_FD flag to get task
exit notification via fd
On 03/14, Josh Triplett wrote:
>
> On Sat, Mar 14, 2015 at 08:18:36PM +0100, Oleg Nesterov wrote:
>
> Is there any information somewhere on how this state machine of doom is
> *supposed* to work? :)
This looks as if you think that other parts of this kernel differ ;)
> Why would "p->task_state == EXIT_DEAD" mean
> something different in wait_consider_task?
different? but once again, EXIT_DEAD never meant "autoreap". It always
means "already reaped". OK, more correctly it means "release_task() will
be called soon, please ignore me".
> Pulling the EXIT_DEAD tasks out of those lists completely does sound
> like a good simplification. However, that doesn't seem to be the
> current expectation in wait_consider_task, which just returns if
> p->task_state == EXIT_DEAD to skip considering that task.
See above. And another email I sent.
> And an autoreaping task isn't necessarily dead yet; it just shouldn't be
> waited on.
Yes, sure, but please do not confuse this with EXIT_DEAD. In fact, please
do not confuse this with ->task_state.
> > However, currently this is TODO. The main problem is the locking in
> > wait_task_zombie(), we can set EXIT_DEAD and remove the task from list
^^^^^^
I mean, "we can't".
> > under read_lock().
>
> That appears to be only reachable for zombies, which an autoreaping task
> should never become.
Sure. I meant that other paths which can set EXIT_DEAD are simpler wrt
"kill the EXIT_DEAD and EXIT_TRACE state" patch we actually want. But lets
not discuss this here, this is offtopic.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists