lkml.org 
[lkml]   [2004]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: poll() in 2.6 and beyond
On Tue, 2 Mar 2004, Roland Dreier wrote:

> Richard> Well the device's poll function isn't getting called the
> Richard> second time with 2.6.0. I never checked it in 2.4.x
> Richard> because it always worked. This problem occurs in a
> Richard> driver that only returns the fact that one event
> Richard> occurred. When it failed to report the event when built
> Richard> with a newer kernel, I added diagnostics which showed
> Richard> that the poll in the driver was only called once --and
> Richard> that the return from poll_wait happened immediately.
>
> Your driver is buggy. It's not surprising since you fundamentally
> don't understand the kernel interface you're trying to use.
>
> Richard> So, if the poll_wait isn't a wait-function, but just some
> Richard> add-wakeup to the queue function, then its name probably
> Richard> should have been changed when it changed. At one time it
> Richard> did, truly, wait until it was awakened with
> Richard> wake_up_interruptible.
>
> When did it change? Show me a kernel version where poll_wait() waited
> until the driver woke it up. (Kernel versions at least as far back as
> 1.0 are readily available from kernel.org, so it should be easy for
> you)
>
> - Roland
>

I never said the DRIVER woke up, but that poll sleeps.

FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
100 0 1 0 6 0 224 148 do_select S ? 0:01 /sbin/init auto
[SNIPPED....]
40 0 115 114 9 0 1452 728 pipe_wait S ? 0:00 /usr/sbin/nmbd -D
100000 0 11109 9459 16 0 1044 476 R 1 0:00 ps -laxw
0 0 11107 9504 12 0 692 216 do_poll S 2 0:00 ./tester

.... and if it DOESN'T then ps is buggy and/or the entry in /proc
in buggy.
Clearly this task is sleeping in do_poll.



Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [from the cache]
©2003-2011 Jasper Spaans