From: Willy Tarreau <w@1wt.eu>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, tglx@tglx.de, mingo@elte.hu,
torvalds@linux-foundation.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [patch v2 0/5] Nano/Microsecond resolution for select() and poll()
Date: Sun, 31 Aug 2008 18:55:54 +0200 [thread overview]
Message-ID: <20080831165554.GG19337@1wt.eu> (raw)
In-Reply-To: <20080831092828.13ae0279@infradead.org>
Hi Arjan,
On Sun, Aug 31, 2008 at 09:28:28AM -0700, Arjan van de Ven wrote:
> One thing to note is that on my machine, the current select() implementation
> will return after 1997 microseconds when asked for 1999 microseconds; this
> can be seen in a zoom in of the graph above:
> http://www.tglx.de/~arjan/zoom.png
> E.g. select() is returning too early in current Linux kernels; and this is
> also fixed (by nature) by this patch series.
This is a good news. I've been bothered by this problem for a long time
and got used to add 99999 us to any delay fed to select() (that started
when HZ=100). I remember having noticed performance improvements in my
applications using this trick even on other systems, so I don't think
that Linux is the only one with this anomaly. I think it's simply caused
by the rounding methods which make it hard to compute an accurate deadline
when a value is converted before being added to jiffies.
I do not remember noticing this on epoll though. Maybe it's just because
I did not look close enough :-/
Cheers,
Willy
next prev parent reply other threads:[~2008-08-31 16:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-31 16:28 Arjan van de Ven
2008-08-31 16:29 ` [PATCH 1/5] select: Introduce a hrtimeout function Arjan van de Ven
2008-08-31 16:29 ` [PATCH 2/5] select: add a timespec_add_safe() function Arjan van de Ven
2008-08-31 16:30 ` [PATCH 3/5] select: add poll_select_set_timeout() and poll_select_copy_remaining() helpers Arjan van de Ven
2008-08-31 16:30 ` [PATCH 4/5] select: add a poll specific struct to the restart_block union Arjan van de Ven
2008-08-31 16:31 ` [PATCH 5/5] select: switch select() and poll() over to hrtimers Arjan van de Ven
2008-08-31 16:55 ` Willy Tarreau [this message]
2008-08-31 21:13 ` [patch v2 0/5] Nano/Microsecond resolution for select() and poll() Davide Libenzi
2008-08-31 21:28 ` Arjan van de Ven
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=20080831165554.GG19337@1wt.eu \
--to=w@1wt.eu \
--cc=arjan@infradead.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@tglx.de \
--cc=torvalds@linux-foundation.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®