浏览代码

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.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
LKML-Reference: <20100525214912.GA1934@r2bh72.net.upc.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Stanislaw Gruszka 15 年之前
父节点
当前提交
174bd1994e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/hrtimer.c

+ 1 - 1
kernel/hrtimer.c

@@ -89,7 +89,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
 
 
 	do {
 	do {
 		seq = read_seqbegin(&xtime_lock);
 		seq = read_seqbegin(&xtime_lock);
-		xts = current_kernel_time();
+		xts = __current_kernel_time();
 		tom = wall_to_monotonic;
 		tom = wall_to_monotonic;
 	} while (read_seqretry(&xtime_lock, seq));
 	} while (read_seqretry(&xtime_lock, seq));