Skip to contentSkip to conversation

hrtimer: avoid double seqlock

PATCH Stanislaw Gruszka 1 participant 2 messages May 25, 2010 – May 26, 2010

lore
Share & tools
lore
#0 lore raw
kernel/hrtimer.c +1 -1
index b9b134b..5c69e99 100644
@@ -89,7 +89,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
 
 	do {
 		seq = read_seqbegin(&xtime_lock);
-		xts = current_kernel_time();
+		xts = __current_kernel_time();
 		tom = wall_to_monotonic;
 	} while (read_seqretry(&xtime_lock, seq));
 
#1 lore raw

[tip:timers/urgent] hrtimer: Avoid double seqlock

Commit-ID:  174bd1994ec67a6e6191c4ed8e5dac17fa221b84
Gitweb:     http://git.kernel.org/tip/174bd1994ec67a6e6191c4ed8e5dac17fa221b84
Author:     Stanislaw Gruszka <[email protected]>
AuthorDate: Tue, 25 May 2010 23:49:12 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 26 May 2010 16:15:37 +0200

hrtimer: Avoid double seqlock

hrtimer_get_softirq_time() has it's own xtime lock protection, so it's safe to use plain __current_kernel_time() and avoid the double seqlock loop.

LKML-Reference: <[email protected]>

---
 kernel/hrtimer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/hrtimer.c +1 -1
index b9b134b..5c69e99 100644
@@ -89,7 +89,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
 
 	do {
 		seq = read_seqbegin(&xtime_lock);
-		xts = current_kernel_time();
+		xts = __current_kernel_time();
 		tom = wall_to_monotonic;
 	} while (read_seqretry(&xtime_lock, seq));