Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: vwp@vancpower.com <vwp@vancpower.com>
Subject: adjtimex
Date: Tue, 13 Jan 1998 09:19:56 -0500	[thread overview]
Message-ID: <81e839c3bd8606bb86611a473f419969.axp-list@archive.invalid> (raw)

Apologies if this has been discussed, but I couldn't find any references
searching the list archives.

I've been trying to get adjtimex working on one of our alphas,
specifically with mode ADJ_OFFSET_SINGLESHOT to skew the time. The
offset value in the timex struct never seems to change, and a look at
sched.c in linux/kernel in the routine update_wall_time_one_tick ()
yields:

	if (time_adjust) {
	    /* We are doing an adjtime thing. 
	     *
	     * Modify the value of the tick for next time.
	     * Note that a positive delta means we want the clock
	     * to run fast. This means that the tick should be bigger
	     *
	     * Limit the amount of the step for *next* tick to be
	     * in the range -tickadj .. +tickadj
	     */
	     if (time_adjust > tickadj)
		time_adjust_step = tickadj;
	     else if (time_adjust < -tickadj)
		time_adjust_step = -tickadj;
	     else
		time_adjust_step = time_adjust;
	     
	    /* Reduce by this step the amount of time left  */
	    time_adjust -= time_adjust_step;

But tickadj is defined at the top of the file as:

int tickadj = 500/HZ;			/* microsecs */

and HZ for the alpha is 1024, so tickadj is 0, and time_adjust (which
is just the value returned in offset of the timex struct) is never
changed, since time_adjust_step always gets set to 0.

Am I missing something obvious here? (BTW, on intels HZ is 100, giving
a tickadj of 5, and sure enough, adjtimex works there :-)).

Thanks,

-- 
=========================================================================
 vwp@vancpower.com            (804)257-4612          (804)257-4750 (fax)

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

                 reply	other threads:[~1998-01-13 14:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox