From: wu Jianfeng <stormplayer@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: the select system call's implementation may have some bug in preempt kernel mode
Date: Fri, 9 Oct 2009 15:11:14 +0800 [thread overview]
Message-ID: <a5b3ea7b0910090011k7558faf2p4de252875587291e@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0910090849400.9428@localhost.localdomain>
> Right, but that does not cause the task to be scheduled out for ever.
I don't know why ???
the process state is TASK_INTERRUPTIBLE, and was scheduled out.
if no one wake up it or any signals received, it will sleep for ever.
The process does't entered any file's wait queue at that point, so I
am sure no one will wake up it.
Am i right?
2009/10/9 Thomas Gleixner <tglx@linutronix.de>:
> On Fri, 9 Oct 2009, wu Jianfeng wrote:
>> A process may sleep for ever when he call select system call.
>> In detail, if the process was scheduled out just at the point it set
>> its state to TASK_INTERRUPTIBLE.
>>
>> The events that may cause the process to be scheduled out is(in
>> preempt kernel) :
>> 1) time interrupt and the process's time slice is exhausted.
>> 2) an interrupt accured, and wake up another process with high priority.
>
> Right, but that does not cause the task to be scheduled out for ever.
>
>> set_current_state(TASK_INTERRUPTIBLE); ######## here set the
>> interrupt to TASK_INTERRUPTIBLE state
>>
>> ########### if the process was schedued out here, it
>> will can never been waken up .
>> ########### Because the process wasn't attached to any
>> file's waitqueue at this point yet
>
> When the task is scheduled out at that point, it is not
> deactivated. It is preempted, which means it stays on the run queue
> despite of the TASK_INTERRUPTIBLE state and is scheduled back in later
> on.
>
> Thanks,
>
> tglx
>
next prev parent reply other threads:[~2009-10-09 7:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a5b3ea7b0910082242s6ce8275dr7f962ce526e55cd2@mail.gmail.com>
2009-10-09 5:50 ` wu Jianfeng
2009-10-09 7:02 ` Thomas Gleixner
2009-10-09 7:11 ` wu Jianfeng [this message]
2009-10-09 7:22 ` Thomas Gleixner
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=a5b3ea7b0910090011k7558faf2p4de252875587291e@mail.gmail.com \
--to=stormplayer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®