From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757392AbcAONJk (ORCPT ); Fri, 15 Jan 2016 08:09:40 -0500 Received: from casper.infradead.org ([85.118.1.10]:60084 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755845AbcAONJg (ORCPT ); Fri, 15 Jan 2016 08:09:36 -0500 Date: Fri, 15 Jan 2016 14:09:32 +0100 From: Peter Zijlstra To: Alexander Shishkin Cc: Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , jolsa@redhat.com Subject: Re: [PATCH] perf: Cleanup user's child events Message-ID: <20160115130932.GL6357@twins.programming.kicks-ass.net> References: <1452856935-364-1-git-send-email-alexander.shishkin@linux.intel.com> <20160115125453.GK6357@twins.programming.kicks-ass.net> <87lh7rvvqa.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lh7rvvqa.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 15, 2016 at 03:05:33PM +0200, Alexander Shishkin wrote: > Peter Zijlstra 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.