Re: [PATCH] perf: Cleanup user's child events
From: Peter Zijlstra
Date: Fri Jan 15 2016 - 08:09:42 EST
On Fri, Jan 15, 2016 at 03:05:33PM +0200, Alexander Shishkin wrote:
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
> > On Fri, Jan 15, 2016 at 01:22:15PM +0200, Alexander Shishkin wrote:
> >> Events are leaking in the following scenario: user creates an event for
> >> task A, task A forks into B (producing a child event), user closes the
> >> original event. Both original user's event and its child will remain for
> >> as long as task B is around. In other words, we don't clean up children
> >> when we try to release the parent.
> > The orphan stuff should clear those up, no?
> Not if they don't schedule after the parent's gone.
This is true. So when Jiri did this we tried the immediate thing and
that exploded due to lock inversions.
You mention some of that. Let me go dig out that old thread to see if
its the same.
I feel that we should not have both approaches.