From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.ittershagen@googlemail.com (Philipp Ittershagen) Date: Wed, 18 Apr 2012 10:14:08 +0200 Subject: Hung Task Timeout In-Reply-To: References: Message-ID: <20120418081408.GA20641@peter> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Apr 18, 2012 at 01:01:45PM +0530, mani wrote: > I think in my case both the tasks wait in the wait_queue and never come to > the TASK_RUNNING state. > In case of the TASK_INTERRUPTIBLE, it will get scheduled (or put to run > queue) in two cases only:- > 1. If it receive any signal not before that (we are not sending any signal > to the task so it will remain in the wait_queue) > 2. we call a wake_up () call. > otherwise there is no point in putting the task in run queue which has > nothing to do. Yes, correct. You should use TASK_INTERRUPTIBLE here, otherwise your kernel thread cannot receive signals and you are not able to kill(1) your thread from userspace or use kthread_stop() in the kernel. Greetings, Philipp