From: Jamie Lokier <jamie@shareable.org>
To: Andrew Morton <akpm@osdl.org>
Cc: "Bill Rugolsky Jr." <brugolsky@telemetry-investments.com>,
torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][4/4] poll()/select() timeout behavior
Date: Sat, 21 Feb 2004 16:18:06 +0000 [thread overview]
Message-ID: <20040221161806.GA15991@mail.shareable.org> (raw)
In-Reply-To: <20040220201328.609fe4e2.akpm@osdl.org>
Andrew Morton wrote:
> > Unfortunately, fixing the fencepost error places a hard lower limit of
> > 1/HZ on the time slept, and increases the average minimum sleep time
> > threefold, from 1/(2*HZ) jiffy to 3/(2*HZ).
>
> I'm inclined to live with the current behaviour rather than
> risk breaking existing apps.
select's behaviour is fun when trying to do smooth game animation on
X... Humans are pretty good at noticing jitter in the animation of a
moving object. Years ago, I ended up writing an estimator which
deduced the granularity and rounding of select(), so that I could then
_reduce_ the timeout given to select() followed by a busy wait up to
the desired time. That was needed for SunOS. Nowadays with 1kHz
jiffies it's not a problem, but not all systems have that.
So, I agree, the change might break current apps.
If the current behaviour is retained, shouldn't select(), poll() and
epoll() at least agree on the same rounding direction? poll/epoll
should be suitable as replacements for select, but I don't think they
are timing-wise.
(Btw, Bill, did you take a look at epoll too?)
-- Jamie
next prev parent reply other threads:[~2004-02-21 16:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-20 21:04 [PATCH][4/4] poll()/select() timeout behavior Bill Rugolsky Jr.
2004-02-21 4:13 ` Andrew Morton
2004-02-21 16:18 ` Jamie Lokier [this message]
2004-02-21 19:27 ` Bill Rugolsky Jr.
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=20040221161806.GA15991@mail.shareable.org \
--to=jamie@shareable.org \
--cc=akpm@osdl.org \
--cc=brugolsky@telemetry-investments.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.