Re: [tip:perf/core] perf/core: Check return value of the perf_event_read() IPI

From: Vince Weaver
Date: Mon Aug 29 2016 - 09:14:56 EST


On Mon, 29 Aug 2016, Peter Zijlstra wrote:

>
> The best I can come up with is something like:
>
>
> do {
> state = READ_ONCE(event->state);
> if (state != ACTIVE)
> break;
> smp_rmb();
> cpu = READ_ONCE(event->cpu);
> smp_rmb();
> } while (READ_ONCE(event->state) != state);
>
>
> And I suppose perf_event_restart() should do the same thing... Let me
> ponder this a wee bit more.

the perf_fuzzer trips over this warning fairly regularly too, so once you
have a patch you're happy with I can give it a test.

I ordered a whole crate of null modem cables so I've got a whole bunch of
serial consoles ready and raring to go. Maybe I can find out how the
fuzzer crashes the new skylake machine, it doesn't leave anything useful
in the syslog.

Vince