]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] optimize writer path in time_interpolator_get_counter()
authorAlex Williamson <alex.williamson@hp.com>
Tue, 6 Sep 2005 22:17:04 +0000 (15:17 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:24 +0000 (16:57 -0700)
commitcfdb91347fa21d957bd5c9fe47b37f9ee2ce367d
treee750143e578503b77a66eff21595b16730506802
parent67be2ffcb0fb7d3d5f67848ab382496431fe2d19
[PATCH] optimize writer path in time_interpolator_get_counter()

      Christoph Lameter <clameter@engr.sgi.com>

When using a time interpolator that is susceptible to jitter there's
potentially contention over a cmpxchg used to prevent time from going
backwards.  This is unnecessary when the caller holds the xtime write
seqlock as all readers will be blocked from returning until the write is
complete.  We can therefore allow writers to insert a new value and exit
rather than fight with CPUs who only hold a reader lock.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/timer.c