Re: [PATCH] perf_event: fix loss of notification with multi-event

From: Peter Zijlstra
Date: Mon Nov 28 2011 - 05:11:14 EST


On Sat, 2011-11-26 at 02:47 +0100, Stephane Eranian wrote:
> Here is a fixed version of Peter's patch.
> I fixed the compilation errors + added the missing
> linked list + spinlock initializations.
>
> I also added the mmap_mutex in perf_poll() to avoid the
> race with perf_set_output(). It's not pretty but it solves
> the problem of a process getting stuck on a sampling buffer
> which is never going to get any samples. This was an unlikely
> scenario but we should take care of it anyway.
>
> This patch solves the issue with loss of buffer notifications
> when sampling on multiple events at the same time. In that
> case fewer than expected samples would be captured.

Hehe, so it actually works eh.. amazing stuff ;-)

OK, I'll stick it in perf/urgent.. Thanks Stephane!

If anybody happens upon a prettier solution, don't be shy and please do
tell us ;-)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/