Files
linux/kernel
Sebastian Andrzej Siewior e708d7ad80 perf: Do poll_wait() before checking condition in perf_poll()
One should first enqueue to the waitqueue and then check for the
condition. If the condition gets true after mutex_unlock() but before
poll_wait() then we lose it and would have wait for another wakeup.

This has been like this since v2.6.31-rc1 commit c7138f37f9 ("perf_counter:
fix perf_poll()"). Before that it was slightly worse. I guess we get enough
wakeups so if we miss here one it doesn't really matter. It is still a
bad example.

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
2014-08-13 07:51:11 +02:00
..
2014-06-10 15:34:46 -07:00
2014-06-06 16:08:14 -07:00
…
…
…
…
2014-07-05 11:17:45 +02:00
…
…
…
…
…
…
…
…
…
…
2014-07-09 09:14:33 -07:00
…
…
…
2014-04-30 13:46:17 +02:00
…
…
…