Re: [PATCH_TAKE_2] now < last_tick problem

From: David Mosberger <davidm_at_napali.hpl.hp.com>
Date: 2003-10-14 04:17:06
>>>>> On Mon, 13 Oct 2003 12:11:52 +1000, Ian Wienand <ianw@gelato.unsw.edu.au> said:

  Ian> Well, to my eyes the use of the xtime_lock in do_gettimeofday() looks
  Ian> OK, but I guess what you are saying is that the message is moot --
  Ian> xtime_lock protects everything itc_get_offset() needs, and
  Ian> do_gettimeofday() has a read lock on xtime_lock and so reads the
  Ian> offset again if something was updated underneath it.

You do realize that xtime_lock is NOT a lock at all?  Seqlock is a
scheme for lock-free synchronization.  Readers and writers will run
concurrently and the only guarantee that you get is that if a writer
interfered with a reader, the reader will retry its operation (but of
course, this means that the reader occasionally will be seeing
inconsistent data).

	--david
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Oct 13 14:21:45 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST