wait_event and preemption in 2.6
michael_soulier_at_mitel.com
Date: 10/08/04
- Previous message: Russell King: "Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6"
- Next in thread: Robert Love: "Re: wait_event and preemption in 2.6"
- Reply: Robert Love: "Re: wait_event and preemption in 2.6"
- Reply: Joe Korty: "Re: wait_event and preemption in 2.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 8 Oct 2004 13:45:10 -0400 To: linux-kernel@vger.kernel.org
I am sending this on behalf of a coworker who is unfortunate enough to
be using a crappy email client. We are not subscribed to the mailing
list, so please include us in your replies.
---quote---
Dear kernel folks,
I'm writing a device driver for PPC Linux and I'm using wait_event. It
seems to me that there is a potential race condition in wait_event when
preemption is turned on (2.6 kernel).
The scenario goes something like this: After the waiting process is
woken up and returns from schedule it goes to the top of the loop and
prepares to wait again (despite the condition being true). Then it will
check the condition and break out of the loop. But what if in-kernel
preemption occurs while it's doing that and another process is
immediately scheduled to run? Does the process sleep forever? Assume
that the event (say interrupt) that caused the original wakeup is a one
shot.
I'm probably missing something. I've googled for an answer and asked
some of my Linux friends but it's not clear. Thanks for any replies.
Please cc me.
John
---end---
Thank you,
Mike
-- Michael P. Soulier <michael_soulier@mitel.com> 6000/6010/60* Development, Mitel Networks Corporation "...the word HACK is used as a verb to indicate a massive amount of nerd-like effort." -Harley Hahn, A Student's Guide to Unix - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Russell King: "Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6"
- Next in thread: Robert Love: "Re: wait_event and preemption in 2.6"
- Reply: Robert Love: "Re: wait_event and preemption in 2.6"
- Reply: Joe Korty: "Re: wait_event and preemption in 2.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|