From: Oleg Nesterov <oleg@tv-sign.ru>
To: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: Question about task_struct::state
Date: Tue, 10 Jun 2008 21:19:57 +0400 [thread overview]
Message-ID: <20080610171957.GB6038@tv-sign.ru> (raw)
In-Reply-To: <20080610155055.GC4345@linux.vnet.ibm.com>
On 06/10, Dhaval Giani wrote:
>
> sched.h has a comment in task_struct
>
> volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
>
> After some searching, I've not been able to figure out how state can
> become -1 (or unrunnable). Can you let me know how that happens?
>
> If it cannot reach that state, then maybe this patch is needed.
>
> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
>
> Index: linux-2.6/include/linux/sched.h
> ===================================================================
> --- linux-2.6.orig/include/linux/sched.h 2008-06-10 21:13:02.000000000 +0530
> +++ linux-2.6/include/linux/sched.h 2008-06-10 21:14:44.000000000 +0530
> @@ -1024,7 +1024,7 @@ struct sched_rt_entity {
> };
>
> struct task_struct {
> - volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
> + volatile long state; /* 0 runnable, >0 stopped */
I think you are right, the comment is wrong (obsolete?).
Perhaps it is better to just remove it, or add a note about TASK_RUNNING/etc
above. ">0 stopped" looks a bit confusing too.
I'd suggest you to change the subject and send the patch to Andrew.
Oleg.
prev parent reply other threads:[~2008-06-10 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 15:50 Dhaval Giani
2008-06-10 17:19 ` Oleg Nesterov [this message]
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=20080610171957.GB6038@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=a.p.zijlstra@chello.nl \
--cc=dhaval@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vatsa@linux.vnet.ibm.com \
/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®