From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444AbdIFQY3 (ORCPT ); Wed, 6 Sep 2017 12:24:29 -0400 Received: from mail.skyhub.de ([5.9.137.197]:42810 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753775AbdIFQY0 (ORCPT ); Wed, 6 Sep 2017 12:24:26 -0400 Date: Wed, 6 Sep 2017 18:24:14 +0200 From: Borislav Petkov To: Alexander Shishkin Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, acme@redhat.com, kirill.shutemov@linux.intel.com, rric@kernel.org Subject: Re: [RFC PATCH 00/17] perf: Detached events Message-ID: <20170906162414.djyec6rlu2ktzdag@pd.tnic> References: <20170905133026.13689-1-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170905133026.13689-1-alexander.shishkin@linux.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) 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:09PM +0300, Alexander Shishkin wrote: > Detached events: a new flag to the perf syscall makes a 'detached' event, > which exists after its file descriptor is released. Not all detached events > are per-thread AUX events: this tries to take into account the need for > system-wide persistent events too. Nice, thanks! > (2) Need to be able to kill those events, so they need to be accessible > after they are created. > Event files: detached events exist as files in tracefs (at the moment), can > be opened/mmaped/read/removed. I guess I'll see when I continue reading but I remember us doing ioctls on the event fd. > (6) Ring buffer memory accounting needs to take this new arrangement into > account: one user can use up at most NR_CPUS * buffer_size memory at any > given point in time. > Only account the first such event and undo the accounting when the last > event is gone. ... and I guess we probably shouldn't allow the user to create too many events and shoot herself in the OOM-foot. > (7) We'll also need to supply all the things that the [PT] decoder normally > finds out via sysfs attributes, like clock ratios, capabilities, etc so that > it also finds its way into the core dump file. > "PMU info" structure is appended to the user page. > > I've also hack the perf tool to support all this, all these things can be > found at [1]. I'm not posting the tooling patches though, them being > thoroughly ugly and proof-of-concept. In short, perf record will create > detached events with '--detached' and afterwards will open detached events > via their path in tracefs. Sounds nice. I'd need to test all that just so I can be able to create detached RAS events (which are tracepoints) with it. Thanks. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.