From: john stultz <johnstul@us.ibm.com>
To: akpm@osdl.org
Cc: john stultz <johnstul@us.ibm.com>,
linux-kernel@vger.kernel.org, johnstul@us.ibm.com
Subject: [-mm PATCH 1/11] Time: reduced ntp rework part 1 - fix adjtimeadj
Date: Mon, 20 Feb 2006 23:21:09 -0700 [thread overview]
Message-ID: <20060221062108.13304.31735.sendpatchset@cog.beaverton.ibm.com> (raw)
In-Reply-To: <20060221062102.13304.81613.sendpatchset@cog.beaverton.ibm.com>
Syncs up the time-reduced-ntp-rework-part1.patch with the adjtime_adjustment() changes.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
kernel/timer.c | 28 +++++-----------------------
1 files changed, 5 insertions(+), 23 deletions(-)
Index: mm-merge/kernel/timer.c
===================================================================
--- mm-merge.orig/kernel/timer.c
+++ mm-merge/kernel/timer.c
@@ -590,7 +590,6 @@ static long time_adj; /* tick adjust (
long time_reftime; /* time at last adjustment (s) */
long time_adjust;
long time_next_adjust;
-long time_adjust_step; /* per tick time_adjust step */
/*
* this routine handles the overflow of the microsecond field
@@ -757,25 +756,7 @@ static void ntp_advance(unsigned long in
/* calculate the per tick singleshot adjtime adjustment step: */
while (interval_ns >= tick_nsec) {
- time_adjust_step = time_adjust;
- if (time_adjust_step) {
- /*
- * We are doing an adjtime thing.
- *
- * Prepare time_adjust_step to be within bounds.
- * Note that a positive time_adjust means we want
- * the clock to run faster.
- *
- * Limit the amount of the step to be in the range
- * -tickadj .. +tickadj:
- */
- time_adjust_step = min(time_adjust_step, (long)tickadj);
- time_adjust_step = max(time_adjust_step,
- (long)-tickadj);
-
- /* Reduce by this step the amount of time left: */
- time_adjust -= time_adjust_step;
- }
+ time_adjust -= adjtime_adjustment();
interval_ns -= tick_nsec;
}
@@ -851,11 +833,11 @@ static void update_wall_time(unsigned lo
{
do {
/*
- * Calculate the nsec delta using the precomputed NTP
+ * Calculate the nsec delta using the NTP
* adjustments:
- * tick_nsec, time_adjust_step, time_adj
+ * tick_nsec, adjtime_adjustment(), phase_advance()
*/
- long delta_nsec = tick_nsec + time_adjust_step * 1000;
+ long delta_nsec = tick_nsec + adjtime_adjustment() * 1000;
delta_nsec += phase_advance();
xtime_advance(delta_nsec);
next prev parent reply other threads:[~2006-02-21 6:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-21 6:21 [-mm PATCHSET 0/11] Sync -mm w/ B19 timekeeping patches john stultz
2006-02-21 6:21 ` john stultz [this message]
2006-02-21 6:21 ` [-mm PATCH 2/11] Time: reduced ntp rework part 2 (updated) john stultz
2006-02-21 6:21 ` [-mm PATCH 3/11] Time: reduced ntp rework part 2 - fix adjtimeadj john stultz
2006-02-21 6:21 ` [-mm PATCH 4/11] Time: clocksource infrastructure - remove nsec_t john stultz
2006-02-21 6:21 ` [-mm PATCH 5/11] Time: generic timekeeping " john stultz
2006-02-21 6:21 ` [-mm PATCH 6/11] Time: generic timekeeping infrastructure - fix ntp_synced john stultz
2006-02-21 6:21 ` [-mm PATCH 7/11] Time: generic timekeeping infrastructure - wall_offset helper cleanup john stultz
2006-02-21 6:21 ` [-mm PATCH 8/11] Time: i386 conversion part 3 - remove nsec_t john stultz
2006-02-21 6:21 ` [-mm PATCH 9/11] Time: i386 conversion part 3 - backout pmtmr changes john stultz
2006-02-21 6:22 ` [-mm PATCH 10/11] Time: i386 conversion part 4 - del timer_tsc.c john stultz
2006-02-21 6:22 ` [-mm PATCH 11/11]Time: i386 clocksource drivers - backout pmtmr changes john stultz
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=20060221062108.13304.31735.sendpatchset@cog.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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®