From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933981AbcA0Rwk (ORCPT ); Wed, 27 Jan 2016 12:52:40 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:35941 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933080AbcA0Rwi (ORCPT ); Wed, 27 Jan 2016 12:52:38 -0500 Date: Wed, 27 Jan 2016 09:52:34 -0800 From: Alexei Starovoitov To: Peter Zijlstra Cc: Alexander Shishkin , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Jiri Olsa , Daniel Borkmann , Wang Nan Subject: Re: [PATCH v2] perf: Synchronously cleanup child events Message-ID: <20160127175233.GA50601@ast-mbp.thefacebook.com> References: <20160122123847.GS6357@twins.programming.kicks-ass.net> <20160122194403.GC11338@ast-mbp.thefacebook.com> <20160125114846.GW6357@twins.programming.kicks-ass.net> <20160125145414.GG6375@twins.programming.kicks-ass.net> <20160125210410.GH6375@twins.programming.kicks-ass.net> <20160126045947.GA40151@ast-mbp.thefacebook.com> <20160126161637.GF6357@twins.programming.kicks-ass.net> <20160126172425.GJ6375@twins.programming.kicks-ass.net> <20160126233158.GA45142@ast-mbp.thefacebook.com> <20160127095822.GN6357@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160127095822.GN6357@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 27, 2016 at 10:58:22AM +0100, Peter Zijlstra wrote: > > > Meaning there gotta be always a user space process > > that will be holding perf_event FDs. > > By using fget() the BPF array thing will hold the FDs, right? I mean > once you do a full fget() userspace can go and kill itself, the struct > file will persists. Right. I mistakenly thought that fget() will prevent the task from freeing or some fs/directory resources will be hanging. It's from anon_inode. So all good. All concerns cleared.