From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933678AbcATIDb (ORCPT ); Wed, 20 Jan 2016 03:03:31 -0500 Received: from casper.infradead.org ([85.118.1.10]:50711 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751205AbcATIDY (ORCPT ); Wed, 20 Jan 2016 03:03:24 -0500 Date: Wed, 20 Jan 2016 09:03:20 +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 , Jiri Olsa , alexei.starovoitov@gmail.com Subject: Re: [PATCH v2] perf: Synchronously cleanup child events Message-ID: <20160120080320.GE6357@twins.programming.kicks-ass.net> References: <20160118144410.GS6357@twins.programming.kicks-ass.net> <1453216354-9282-1-git-send-email-alexander.shishkin@linux.intel.com> <20160119200558.GC6357@twins.programming.kicks-ass.net> <87io2owx37.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87io2owx37.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 Wed, Jan 20, 2016 at 09:04:28AM +0200, Alexander Shishkin wrote: > Peter Zijlstra writes: > > The most obvious place that generates such magical references would be > > the bpf arraymap doing perf_event_get() on things. There are a few other > > places that take temp references (perf_mmap_close), but those are > > 'short' lived and while ugly will not cause massive grief. > > We won't get to perf_release() before we're done with perf_mmap_close(), > so that one's not really a problem. Only for the file we mmap()'ed, the events we've attached through IOC_SET_OUTPUT will not have a file reference from the mmap().