From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbdJCOud (ORCPT ); Tue, 3 Oct 2017 10:50:33 -0400 Received: from merlin.infradead.org ([205.233.59.134]:32848 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751963AbdJCOuc (ORCPT ); Tue, 3 Oct 2017 10:50:32 -0400 Date: Tue, 3 Oct 2017 16:50:27 +0200 From: Peter Zijlstra To: Alexander Shishkin Cc: Ingo Molnar , linux-kernel@vger.kernel.org, acme@redhat.com, kirill.shutemov@linux.intel.com, Borislav Petkov , rric@kernel.org Subject: Re: [RFC PATCH 14/17] perf: Add ioctl(REATTACH) for detached events Message-ID: <20171003145027.bkkn2p7dcff4xp7o@hirez.programming.kicks-ass.net> References: <20170905133026.13689-1-alexander.shishkin@linux.intel.com> <20170905133026.13689-15-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170905133026.13689-15-alexander.shishkin@linux.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 05, 2017 at 04:30:23PM +0300, Alexander Shishkin wrote: > This adds an ioctl command to demote a detached event to a 'normal' one > that gets destroyed when its file descriptor is closed. It can still be > used to mmap the buffers, but not very useful otherwise. why not simply use the fd obtained from open() on our special filesystem? If you open and then unlink, you loose the 'detached' state and the filedesc is the only life-line.