mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Roland Dreier <roland@topspin.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: poll() in 2.6 and beyond
Date: Wed, 3 Mar 2004 07:38:40 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.53.0403030736350.11111@chaos> (raw)
In-Reply-To: <52vflmpoe9.fsf@topspin.com>

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.



  reply	other threads:[~2004-03-03 12:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1vmPm-4lU-11@gated-at.bofh.it>
     [not found] ` <1vonq-6dr-37@gated-at.bofh.it>
     [not found]   ` <1voGY-6vC-41@gated-at.bofh.it>
     [not found]     ` <1vpjt-7dl-17@gated-at.bofh.it>
     [not found]       ` <1vpCV-7wY-41@gated-at.bofh.it>
     [not found]         ` <1vpWa-7Py-19@gated-at.bofh.it>
2004-03-02 22:53           ` Bill Davidsen
2004-03-02 22:57             ` Roland Dreier
2004-03-02 23:32             ` Richard B. Johnson
2004-03-03  0:07               ` John Muir
2004-03-03  1:18                 ` Richard B. Johnson
2004-03-03  4:04                   ` Roland Dreier
2004-03-03 12:38                     ` Richard B. Johnson [this message]
2004-03-03 14:29                       ` Davide Libenzi
2004-03-03  3:57               ` David Dillow
2004-03-03 18:23                 ` Richard B. Johnson
2004-03-03 19:29                   ` Dave Dillow
2004-03-03 20:10                     ` Richard B. Johnson
2004-03-03 22:25                   ` Linus Torvalds
2004-03-03 22:42                     ` Richard B. Johnson
2004-03-03 23:14                       ` Linus Torvalds
2004-03-03 22:52                     ` Linus Torvalds
2004-03-03 23:07                       ` Richard B. Johnson
2004-03-03  3:06 linux
  -- strict thread matches above, loose matches on Subject: below --
2004-03-02 18:21 Richard B. Johnson
2004-03-02 20:04 ` Roland Dreier
2004-03-02 20:24   ` Richard B. Johnson
2004-03-02 21:00     ` Roland Dreier
2004-03-02 21:26       ` Richard B. Johnson
2004-03-02 21:39         ` Roland Dreier
2004-03-02 21:59           ` Richard B. Johnson
2004-03-02 22:41             ` Dave Dillow
2004-03-02 22:56             ` Roland Dreier
2004-03-02 23:16               ` Richard B. Johnson
2004-03-02 23:21                 ` Roland Dreier

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=Pine.LNX.4.53.0403030736350.11111@chaos \
    --to=root@chaos.analogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@topspin.com \
    /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®