Przeglądaj źródła

[PATCH] del_timer_sync(): add cpu_relax()

Relax the CPU in the del_timer_sync() busywait loop.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton 19 lat temu
rodzic
commit
a0009652af
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      kernel/timer.c

+ 1 - 0
kernel/timer.c

@@ -374,6 +374,7 @@ int del_timer_sync(struct timer_list *timer)
 		int ret = try_to_del_timer_sync(timer);
 		int ret = try_to_del_timer_sync(timer);
 		if (ret >= 0)
 		if (ret >= 0)
 			return ret;
 			return ret;
+		cpu_relax();
 	}
 	}
 }
 }