All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH_TAKE_2] now < last_tick problem
Date: Tue, 14 Oct 2003 05:23:39 +0000	[thread overview]
Message-ID: <marc-linux-ia64-106610905400509@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106575925709435@msgid-missing>

>>>>> On Tue, 14 Oct 2003 09:06:21 +1000, Ian Wienand <ianw@gelato.unsw.edu.au> said:

  Ian> That was my point, sorry.

  Ian> do_gettimeofday() does

  Ian>  while (1) {
  Ian>                seq = read_seqbegin(&xtime_lock);
  Ian>                {
  Ian>                        old = last_nsec_offset;
  Ian>                        offset = time_interpolator_get_offset();
  Ian>                        sec = xtime.tv_sec;
  Ian>                        nsec = xtime.tv_nsec;
  Ian>                }
  Ian>                if (unlikely(read_seqretry(&xtime_lock, seq)))
  Ian>                        continue;
  Ian>  ... and so on ...
  Ian> }

  Ian> Previously, if that read_seqbegin was some kind of irq save lock, then
  Ian> time_interpolator_get_offset() (which is itc_get_offset()) should
  Ian> never have been interrupted (especially by the timer interrupt), and
  Ian> the warning message (now < last_tick) meant something was wrong.
  Ian> Using synchronisation, it's probable that itc_get_offset() will be
  Ian> interrupted every now and then, but do_gettimeofday() will keep
  Ian> retrying it till read_seqretry informs it that read the right values.

  Ian> So the warning message in itc_get_offset isn't really needed?

Hmmh, I seem to have misremembered the code.  I thought we updated
last_nsec_offset _before_ read_seqretry(), but that's not the case.  I
think you may be right that we can simply delete the (bogus)
consistency-check.  May want to add a comment about that, though.

	--david

  parent reply	other threads:[~2003-10-14  5:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-10  4:13 [PATCH_TAKE_2] now < last_tick problem Ian Wienand
2003-10-10 16:42 ` David Mosberger
2003-10-13  2:11 ` Ian Wienand
2003-10-13 18:17 ` David Mosberger
2003-10-13 23:06 ` Ian Wienand
2003-10-14  5:23 ` David Mosberger [this message]
2003-10-14  5:53 ` Ian Wienand
2003-10-14 16:58 ` David Mosberger
2003-10-14 23:05 ` Ian Wienand

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=marc-linux-ia64-106610905400509@msgid-missing \
    --to=davidm@napali.hpl.hp.com \
    --cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.