Re: [RFC PATCH 1/1] perf/core: Wake up parent event if inherited event has no ring buffer

From: James Clark
Date: Wed Jan 26 2022 - 11:15:35 EST




On 25/01/2022 19:12, Peter Zijlstra wrote:
> On Mon, Jan 24, 2022 at 02:58:18PM +0000, James Clark wrote:
>
>>> Would this be the better patch?
>>
>> Yes I tested this and it also works.
>
> Excellent!
>
>> There is one other suspicious access
>> of ->rb followed by if(rb) here in perf_poll(), but maybe it works out ok?
>>
>> mutex_lock(&event->mmap_mutex);
>> rb = event->rb;
>> if (rb)
>> events = atomic_xchg(&rb->poll, 0);
>>
>
> That case must be good since it is the event from a file. Those cannot
> be clones.
>
>> We also have a Perf self test that covers this failure for Arm SPE now, I'm not
>> sure if I should post that separately or with your new version of this fix?
>
> They'd be routed through separate trees anyway, Arnaldo takes the
> userspace stuff.
>

Ok we will post that one separately then. What are the next steps for this one?
Will you just put your version directly in your tree, or should I resubmit it with a
new commit message?