mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: raf <raf2@zip.com.au>
To: linux-kernel@vger.kernel.org
Subject: Re: bugreport: poll() timeout always takes 10ms too long
Date: Sat, 23 Jun 2001 10:45:46 +1000	[thread overview]
Message-ID: <20010623104546.A9007@zipperii.zip.com.au> (raw)
In-Reply-To: <20010622115212.A8681@eccles.raf.org> <1yodnnu5.wl@nisaaru.open.nm.fujitsu.co.jp>
In-Reply-To: <1yodnnu5.wl@nisaaru.open.nm.fujitsu.co.jp>; from tachino@open.nm.fujitsu.co.jp on Fri, Jun 22, 2001 at 01:24:50PM +0900

Tachino Nobuhiro wrote:

> 
>  Hello,
> 
> At Fri, 22 Jun 2001 11:52:12 +1000,
> raf@raf.org wrote:
> > 
> > [1.] One line summary of the problem:    
> > 
> > poll() timeout always takes 10ms too long
> > 
> > [2.] Full description of the problem/report:
> > 
> > Select() timeouts work fine. A timeout between 10n-9 and 10n ms times
> > out after 10n ms on average. Poll() timeouts between 10n-9 and 10n ms,
> > on the other hand, time out after 10(n+1) ms on average. It's always a
> > jiffy too long. This means it's impossible to set a 10ms timeout using
> > poll() even though it's possible using select(). The programs and their
> > output below [6] demonstrate this. The same behavious occurs with
> > linux-2.2 and linux-2.4.
> 
> 
>   I think this is correct behavior. The Single UNIX Specification
> describes about the timeout parameter of poll() as follows,
> 
> 	If none of the defined events have occurred on any selected
> 	file descriptor, poll() waits at least timeout milliseconds
> 	for an event to occur on any of the selected file descriptors.
> 
>   On the other hand, select(),
> 
> 	If the specified condition is false for all of the specified
> 	file descriptors, select() blocks, up to the specified timeout
> 	interval, until the specified condition is true for at least
> 	one of the specified file descriptors.

ok, it's a correct behaviour.
but having both poll and select
timeout at the time specified
would also be correct behaviour.
better than that, it would be
expected behaviour.

raf


      reply	other threads:[~2001-06-23  0:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-22  1:52 raf
2001-06-22  4:24 ` Tachino Nobuhiro
2001-06-23  0:45   ` raf [this message]

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=20010623104546.A9007@zipperii.zip.com.au \
    --to=raf2@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    /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®