Files
Linux/include/linux
Peter Zijlstra c7138f37f9 perf_counter: fix perf_poll()
Impact: fix kerneltop 100% CPU usage

Only return a poll event when there's actually been one, poll_wait()
doesn't actually wait for the waitq you pass it, it only enqueues
you on it.

Only once all FDs have been iterated and none of thm returned a
poll-event will it schedule().

Also make it return POLL_HUP when there's not mmap() area to read from.

Further, fix a silly bug in the write code.

Reported-by: Mike Galbraith <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Orig-LKML-Reference: <1237897096.24918.181.camel@twins>
Signed-off-by: Ingo Molnar <[email protected]>
2009-04-06 09:30:32 +02:00
..
…
…
…
…
…
2009-04-05 00:32:22 +02:00
…
2009-03-31 09:56:26 +01:00
…
…
…
…
…
…
…
2009-04-05 02:14:15 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:23 -07:00
2009-04-01 08:59:23 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-03 14:53:32 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-03 14:53:32 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:29 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-30 15:14:53 +02:00
…
…
2009-04-03 09:48:29 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-31 20:15:33 +02:00
2009-04-02 19:04:53 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-02 19:04:49 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-03-30 15:21:59 +02:00
…
…
…
…
…
…
…
…
2009-04-01 08:59:17 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-02 19:04:48 -07:00
…
…
…
…
…
…
…
…
…
…
2009-04-06 09:30:26 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 13:28:15 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:13 -07:00
2009-04-01 08:59:13 -07:00
…
…
…
…
…
2009-04-06 09:30:32 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:13 -07:00
…
…
…
…
…
2009-03-30 15:22:01 +02:00
…
…
…
…
…
…
…
…
…
…
…
2009-03-30 14:28:58 -07:00
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:24 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-03 16:42:35 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2009-04-01 08:59:15 -07:00
…
…
2009-04-02 19:05:01 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…