From: Dhaval Giani <dhaval@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@elte.hu>, Oleg Nesterov <oleg@tv-sign.ru>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
lkml <linux-kernel@vger.kernel.org>
Subject: Question about task_struct::state
Date: Tue, 10 Jun 2008 21:20:55 +0530 [thread overview]
Message-ID: <20080610155055.GC4345@linux.vnet.ibm.com> (raw)
Hi Ingo, Oleg,
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 */
void *stack;
atomic_t usage;
unsigned int flags; /* per process flags, defined below */
--
regards,
Dhaval
next reply other threads:[~2008-06-10 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 15:50 Dhaval Giani [this message]
2008-06-10 17:19 ` Oleg Nesterov
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=20080610155055.GC4345@linux.vnet.ibm.com \
--to=dhaval@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--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®