Re: poll() in 2.6 and beyond

From: Roland Dreier
Date: Tue Mar 02 2004 - 18:22:11 EST


Richard> There are two routines where the CPU is actually given
Richard> up, do_select() and do_poll(). Search for
Richard> schedule_timeout(). Once the scheduler has the CPU, it's
Richard> available for any of the other drivers. It's also
Richard> available for the timer queues, other tasks, and the
Richard> interrupts.

OK, fine, I can't argue with that. But it has nothing to do with the
discussion at hand.

You still haven't said where poll_wait() sleeps in kernel 2.4. You
claimed it was in add_wait_queue(), but add_wait_queue() doesn't sleep
(it's just a list_add() guarded by a lock).

Also, why would another driver for the same poll() call run? There's
only one thread around that cares about this call to poll() -- the
userspace process that originally called poll(). If one driver
sleeps, no other drivers will run until that driver wakes up.

- Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/