From: Willy Tarreau <willy@w.ods.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Peter Staubach <staubach@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] poll(2) timeout values
Date: Thu, 10 Nov 2005 22:02:55 +0100 [thread overview]
Message-ID: <20051110210255.GF11266@alpha.home.local> (raw)
In-Reply-To: <1131642956.20099.39.camel@localhost.localdomain>
On Thu, Nov 10, 2005 at 05:15:56PM +0000, Alan Cox wrote:
> On Iau, 2005-11-10 at 11:31 -0500, Peter Staubach wrote:
> > Clearly, the timeout calculations problem can be fixed without changing
> > the arguments to the sys_poll() routine. However, it is cleaner to fix
> > it this way by ensuring the sizes and types of arguments match.
>
> There really is no need for the kernel API to match the userspace one,
> many of our others differ between the syscall interface which is most
> definitely 'exported' in one sense and the POSIX interface which is
> defined by libc, posix and the LSB etc
>
> No argument about the timeout fix.
I posted a different fix here about a month ago (but I sent it 3 times,
as it was twice wrong). Andrew was about to merge it in his tree but I
have not checked yet. It was different in the sense that it used
msecs_to_jiffies() to do the arithmetic in the best possible way depending
on the HZ value and the ints size. Most of the time (when 1000 % HZ == 0),
it will simplify the operations to a single divide by a constant and
correctly check for integer overflows. Eg, with HZ=250, a simple 2 bits
right shift will replace a multiply followed by an divide.
I'll check whether 2.6.14-mm1 has it, otherwise I can repost it.
Cheers,
Willy
next prev parent reply other threads:[~2005-11-10 21:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-10 16:31 [PATCH] poll(2) timeout values Peter Staubach
2005-11-10 17:15 ` Alan Cox
2005-11-10 21:02 ` Willy Tarreau [this message]
2005-11-11 20:19 ` Peter Staubach
2005-11-11 22:02 ` Willy Tarreau
[not found] ` <a36005b50511101049vf20cde5m9385c433e18dcd2d@mail.gmail.com>
2005-11-10 22:33 ` Alan Cox
[not found] ` <a36005b50511101649l744f78c1i76133434be7304e8@mail.gmail.com>
2005-11-11 13:16 ` Alan Cox
2005-11-11 13:17 ` Peter Staubach
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=20051110210255.GF11266@alpha.home.local \
--to=willy@w.ods.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=staubach@redhat.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