From: Sridhar Samudrala <sri@us.ibm.com>
To: Edgar Toernig <froese@gmx.de>
Cc: davem@redhat.com, jgarzik@pobox.com,
linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: [PATCH] Consolidate multiple implementations of jiffies-msecs conversions.
Date: Fri, 26 Mar 2004 10:49:15 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0403261007370.6718@localhost.localdomain> (raw)
In-Reply-To: <20040326014403.39388cb8.froese@gmx.de>
On Fri, 26 Mar 2004, Edgar Toernig wrote:
> Sridhar Samudrala wrote:
> >
> > The following patch to 2.6.5-rc2 consolidates 6 different implementations
> > of msecs to jiffies and 3 different implementation of jiffies to msecs.
> > All of them now use the generic msecs_to_jiffies() and jiffies_to_msecs()
> > that are added to include/linux/time.h
> >[...]
> > -#define MSECS(ms) (((ms)*HZ/1000)+1)
> > -return (((ms)*HZ+999)/1000);
> > +return (msecs / 1000) * HZ + (msecs % 1000) * HZ / 1000;
>
> Did you check that all users of the new version will work correctly
> with your rounding? Explicit round-up of delays is often required,
> especially when talking to hardware...
I don't see any issues with the 2.6 default HZ value of 1000 as they become
no-ops and there is no need for any rounding.
I guess you are referring to cases when HZ < 1000(ex: 100) and msecs is
less than 10. In those cases, the new version returns 0, whereas some of the
older versions return 1.
If i am not mistaken, Jeff Garjik/David Miller are the maintainers for most
of the users of these routines and i have got an OK from them.
drivers/block/carmel.c
drivers/net/tulip/de204x.c
include/linux/libata.h
include/net/irda/irda.h
drivers/atm/fore200e.c
include/net/sctp/sctp.h
The only other place where the older version is different is
drivers/char/watchdot/shwdt.c
Dave, Jeff
Do you see any issues with the new generic versions of these routines?
Thanks
Sridhar
>
> Ciao, ET.
>
next prev parent reply other threads:[~2004-03-26 18:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-25 20:17 Sridhar Samudrala
2004-03-25 20:32 ` David S. Miller
2004-03-25 20:36 ` Jeff Garzik
2004-03-25 21:05 ` Bill Rugolsky Jr.
2004-03-25 23:49 ` Sridhar Samudrala
2004-03-26 0:44 ` Edgar Toernig
2004-03-26 18:49 ` Sridhar Samudrala [this message]
2004-03-26 19:03 ` Jeff Garzik
2004-03-29 19:57 ` Sridhar Samudrala
2004-03-26 20:45 ` Edgar Toernig
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.58.0403261007370.6718@localhost.localdomain \
--to=sri@us.ibm.com \
--cc=davem@redhat.com \
--cc=froese@gmx.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.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®