The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: linux-kernel@vger.kernel.org
Subject: why do we have wall_jiffies?
Date: Fri, 17 Feb 2006 16:56:17 +1100	[thread overview]
Message-ID: <17397.25985.646489.878694@cargo.ozlabs.ibm.com> (raw)

In kernel/timer.c we currently have jiffies_64, of which jiffies is
the least-significant long-sized piece, and wall_jiffies.  The code
that updates them looks like this (from kernel/timer.c):

static inline void update_times(void)
{
	unsigned long ticks;

	ticks = jiffies - wall_jiffies;
	if (ticks) {
		wall_jiffies += ticks;
		update_wall_time(ticks);
	}
	calc_load(ticks);
}
  
/*
 * The 64-bit jiffies value is not atomic - you MUST NOT read it
 * without sampling the sequence number in xtime_lock.
 * jiffies is defined in the linker script...
 */

void do_timer(struct pt_regs *regs)
{
	jiffies_64++;
	update_times();
	softlockup_tick(regs);
}

In other places there is code that uses (jiffies - wall_jiffies).
However I can't see any way that jiffies and wall_jiffies could ever
be different (except for a few nanoseconds while executing the code
above).  I also can't see any way that `ticks' could ever be anything
other than 1.

Is the wall_jiffies stuff just a leftover from days when we used to do
timekeeping from a softirq?  Or am I missing something fundamental?

Thanks,
Paul.

             reply	other threads:[~2006-02-17  5:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17  5:56 Paul Mackerras [this message]
2006-02-17 18:46 ` why do we have wall_jiffies? john stultz
2006-03-02 16:07   ` Atsushi Nemoto

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=17397.25985.646489.878694@cargo.ozlabs.ibm.com \
    --to=paulus@samba.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