Skip to content

Commit

Permalink
perf: Use POLLIN instead of POLL_IN for perf poll data in flag
Browse files Browse the repository at this point in the history
Currently we flag available data (via poll syscall) on perf fd with
POLL_IN macro, which is normally used for SIGIO interface.

We've been lucky, because POLLIN (0x1) is subset of POLL_IN (0x20001)
and sys_poll (do_pollfd function) cut the extra bit out (0x20000).

Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
olsajiri authored and Ingo Molnar committed Feb 4, 2015
1 parent a83fe28 commit 7c60fc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/events/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/circ_buf.h>
#include <linux/poll.h>

#include "internal.h"

static void perf_output_wakeup(struct perf_output_handle *handle)
{
atomic_set(&handle->rb->poll, POLL_IN);
atomic_set(&handle->rb->poll, POLLIN);

handle->event->pending_wakeup = 1;
irq_work_queue(&handle->event->pending);
Expand Down

0 comments on commit 7c60fc0

Please sign in to comment.