diff options
author | Vince Weaver <[email protected]> | 2011-06-01 15:15:36 -0400 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2011-07-01 11:06:32 +0200 |
commit | 4ec8363dfc1451f8c8f86825731fe712798ada02 (patch) | |
tree | 12db5b26a3ffa179ef119ac945c4d9a6fb1ced88 /lib/mpi/mpiutil.c | |
parent | 0f933625e7b6c3d91878ae95e341bf1984db7eaf (diff) |
perf_events: Fix perf buffer watermark setting
Since 2.6.36 (specifically commit d57e34fdd60b ("perf: Simplify the
ring-buffer logic: make perf_buffer_alloc() do everything needed"),
the perf_buffer_init_code() has been mis-setting the buffer watermark
if perf_event_attr.wakeup_events has a non-zero value.
This is because perf_event_attr.wakeup_events is a union with
perf_event_attr.wakeup_watermark.
This commit re-enables the check for perf_event_attr.watermark being
set before continuing with setting a non-default watermark.
This bug is most noticable when you are trying to use PERF_IOC_REFRESH
with a value larger than one and perf_event_attr.wakeup_events is set to
one. In this case the buffer watermark will be set to 1 and you will
get extraneous POLL_IN overflows rather than POLL_HUP as expected.
[ avoid using attr.wakeup_events when attr.watermark is set ]
Signed-off-by: Vince Weaver <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions