This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] tapset: add a tapset function for reading epoch time in ARM
- From: David Smith <dsmith at redhat dot com>
- To: Josh Stone <jistone at redhat dot com>, Jey Jay <rjayavrp2 at gmail dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, systemtap at sourceware dot org, jeyaraman dot rangasamy at lge dot com
- Date: Thu, 12 Jun 2014 10:10:28 -0500
- Subject: Re: [PATCH] tapset: add a tapset function for reading epoch time in ARM
- Authentication-results: sourceware.org; auth=none
- References: <CAAKGpwRhhQAcCkATd4LAPxFnvH6M99PeCwzD33aVXpSNAmwFVg at mail dot gmail dot com> <20140612103820 dot GE30297 at redhat dot com> <5399BFCE dot 10103 at redhat dot com>
On 06/12/2014 09:57 AM, Josh Stone wrote:
> The problem was with xtime_lock, now called timekeeper_seq. If a probe
> occurs while that write lock is held, then calls getnstimeofday(), it
> would loop forever trying to get the read lock. I don't see anything to
> make me think this has changed on modern kernels.
The following kernel commit converted xtime_lock/timekeeper_seq from a
seqlock into a seqcount. It now might be possible for systemtap to call
the kernel's gettimeofdayns()/do_gettimeofday() here without a
context/locking issue. This kernel commit entered the kernel in version
3.10.
====
commit 9a7a71b1d0968fc2bd602b7481cde1d4872e01ff
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Feb 21 22:51:38 2013 +0000
timekeeping: Split timekeeper_lock into lock and seqcount
We want to shorten the seqcount write hold time. So split the seqlock
into a lock and a seqcount.
Open code the seqwrite_lock in the places which matter and drop the
sequence counter update where it's pointless.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[jstultz: Merge fixups from CLOCK_TAI collisions]
Signed-off-by: John Stultz <john.stultz@linaro.org>
====
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)