Re: [PATCH] perf: Synchronously cleanup child events

From: Ingo Molnar
Date: Tue Jan 19 2016 - 02:45:43 EST



* Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> wrote:

> The orphan cleanup workqueue doesn't always catch orphans, for example, if they
> never schedule after they are orphaned. IOW, the event leak is still very real.
> It also wouldn't work for kernel counters.
>
> Also, there seems to be no reason not to carry out this cleanup procedure
> synchronously during parent event's destruction.

Absolutely, synchronous cleanup will probably also be quicker at triggering any
remaining (and new ;-) races.

Thanks,

Ingo