From: john stultz <johnstul@us.ibm.com>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
yoshfuji@linux-ipv6.org,
Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>,
George Anzinger <george@mvista.com>,
joe-lkml@rameria.de
Subject: Re: [RFC][PATCH] NTP shift_right cleanup (v. A1)
Date: Wed, 14 Sep 2005 11:25:03 -0700 [thread overview]
Message-ID: <1126722303.3455.61.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0509142010030.3728@scrub.home>
On Wed, 2005-09-14 at 20:13 +0200, Roman Zippel wrote:
> > @@ -792,13 +769,8 @@ static void update_wall_time_one_tick(vo
> > * advance the tick more.
> > */
> > time_phase += time_adj;
> > - if (time_phase <= -FINENSEC) {
> > - long ltemp = -time_phase >> (SHIFT_SCALE - 10);
> > - time_phase += ltemp << (SHIFT_SCALE - 10);
> > - delta_nsec -= ltemp;
> > - }
> > - else if (time_phase >= FINENSEC) {
> > - long ltemp = time_phase >> (SHIFT_SCALE - 10);
> > + if (abs(time_phase) >= FINENSEC) {
> > + long ltemp = shift_right(time_phase, (SHIFT_SCALE - 10));
> > time_phase -= ltemp << (SHIFT_SCALE - 10);
> > delta_nsec += ltemp;
> > }
>
> I checked and this actually generates worse code.
Well, if I drop the abs() and use:
if ((time_phase >= FINENSEC) || (time_phase <= -FINENSEC))
It looks pretty close in my test. Is that cool with you?
thanks
-john
next prev parent reply other threads:[~2005-09-14 18:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 17:48 john stultz
2005-09-14 17:53 ` john stultz
2005-09-14 18:39 ` NTP leap second question George Anzinger
2005-09-14 18:54 ` john stultz
2005-09-15 6:49 ` Ulrich Windl
2005-09-15 17:21 ` Kyle Moffett
2005-09-15 18:35 ` Alan Cox
2005-09-14 18:13 ` [RFC][PATCH] NTP shift_right cleanup (v. A1) Roman Zippel
2005-09-14 18:25 ` john stultz [this message]
2005-09-14 19:11 ` Roman Zippel
2005-09-14 18:40 ` [RFC][PATCH] NTP shift_right cleanup (v. A2) john stultz
2005-09-20 1:28 ` [PATCH] " john stultz
2005-09-21 3:24 ` [PATCH] NTP shift_right cleanup (v. A3) john stultz
2005-09-21 5:24 ` Nick Piggin
2005-09-21 8:13 ` Ulrich Windl
2005-09-21 12:18 ` Nick Piggin
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=1126722303.3455.61.camel@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=george@mvista.com \
--cc=joe-lkml@rameria.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ulrich.windl@rz.uni-regensburg.de \
--cc=yoshfuji@linux-ipv6.org \
--cc=zippel@linux-m68k.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®