From: Ingo Molnar <mingo@elte.hu>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 1/2] PF_DEAD: cleanup usage
Date: Fri, 25 Nov 2005 06:12:32 +0100 [thread overview]
Message-ID: <20051125051232.GB22230@elte.hu> (raw)
In-Reply-To: <4385E3FF.C99DBCF5@tv-sign.ru>
* Oleg Nesterov <oleg@tv-sign.ru> wrote:
> schedule() checks PF_DEAD on every context switch, and sets ->state =
> EXIT_DEAD to ensure that exited task will be deactivated.
>
> I think it is better to set EXIT_DEAD in do_exit(), along with PF_DEAD
> flag.
nice idea - your patch looks good to me.
> It is safe to do without task_rq() locking, because concurrent
> try_to_wake_up() can't change task's ->state: the 'state' argument of
> try_to_wake_up() can't have EXIT_DEAD bit. And in case when
> try_to_wake_up() sees stale value of ->state == TASK_RUNNING it will
> do nothing.
we should really not be getting concurrent wakeups in this situation
anyway - and you are right that even if we got, it should have no effect
neither in the EXIT_DEAD nor in the TASK_RUNNING case.
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
next prev parent reply other threads:[~2005-11-25 5:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-24 16:02 Oleg Nesterov
2005-11-25 5:12 ` Ingo Molnar [this message]
2005-11-25 18:01 ` Linus Torvalds
2005-11-26 10:46 ` Oleg Nesterov
2005-11-26 17:55 ` Linus Torvalds
2005-11-26 19:21 ` Oleg Nesterov
2005-11-26 18:47 ` Linus Torvalds
2005-11-27 12:18 ` Ingo Molnar
2005-11-27 13:02 ` Oleg Nesterov
2005-11-27 11:55 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051125051232.GB22230@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®