瀏覽代碼

[PATCH] add cpu_relax to hrtimer_cancel

Add a cpu_relax() to the hand-coded spinwait in hrtimer_cancel().

Signed-off-by: Joe Korty <joe.korty@ccur.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Joe Korty 19 年之前
父節點
當前提交
5ef37b1964
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      kernel/hrtimer.c

+ 1 - 0
kernel/hrtimer.c

@@ -501,6 +501,7 @@ int hrtimer_cancel(struct hrtimer *timer)
 
 		if (ret >= 0)
 			return ret;
+		cpu_relax();
 	}
 }