All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about task_struct::state
@ 2008-06-10 15:50 Dhaval Giani
  2008-06-10 17:19 ` Oleg Nesterov
  0 siblings, 1 reply; 2+ messages in thread
From: Dhaval Giani @ 2008-06-10 15:50 UTC (permalink / raw)
  To: Ingo Molnar, Oleg Nesterov; +Cc: Srivatsa Vaddagiri, Peter Zijlstra, lkml

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-10 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 15:50 Question about task_struct::state Dhaval Giani
2008-06-10 17:19 ` Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.