Messages in this thread | | | Date | Sat, 23 Oct 1999 02:34:13 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: schedule_timeout() semantics/usage? |
| |
On Fri, 22 Oct 1999, Jeff Garzik wrote:
>Since there is confusion on this subject, does it seem reasonable to >provide functions to encapsulate this behavior?
I think ksnooze_nowakeups wouldn't be very useful. My point is that if the code is written with a good design, if you are running schedule_timeout() while you are also registered for an event, then you _want_ to get the wakeup from such event. The timeout may be for handling a missed event, crashed hardware that must be resetted or so on.
You should stay registered in a waitqueue only for the minimal time you want to catch the wakeup. This will generate the best performance and the cleaner code (all the VM does so for example).
So if you want to wait some time (and you are not waiting for an event) usually you are not registered in any waitqueue either, and so the trivial UNINTERRUPTIBLE way (without the do {} while() loop) is just fine.
Andrea
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |