public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Robert Richter <rric@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org,
	Tomasz Nowicki <tomasz.nowicki@linaro.org>
Subject: Re: [PATCH v4 00/16] perf, persistent: Add persistent events
Date: Tue, 6 May 2014 20:58:26 +0200	[thread overview]
Message-ID: <20140506185826.GF25013@pd.tnic> (raw)
In-Reply-To: <20140506123907.GV32718@rric.localhost>

On Tue, May 06, 2014 at 02:39:07PM +0200, Robert Richter wrote:
> I rather would change the ioctl to
> 
>  id = ioctl(PERF_EVENT_IOC_SET_PERSIST, arg);
> 
>  arg != 0:	create persistent event (unclaim)
>  arg == 0:	delete persistent event (claim)
> 
> This has the advantage that the naming is better and arg can be used
> as parameter (e.g. event id to share a namespace).

Yep, this is better than the CLAIM/UNCLAIM thing.

> The unclaim ioctl *creates* a buffer with 512kB default size. The
> reopening process must mmap with the same buffer size. This is a
> problem as in this implementation the buffer size is fix and can not
> be adjusted.

Why do we need it to be adjustable?

> We could let create the process the buffers and make the
> event persistent including the current buffers.
> 
> Variable buffer size is a must,

Yeah, why? I'm just asking for my own understanding.

> so the reopening process also must be
> able to detect buffer size. Mmap buffer size could be detected by
> mmap'ing only the header page, reading the buffer size from the header
> and then remapping the buffer with adjusted size.
> 
> It would be good to have a perf tool option -P that puts events in
> persistent state instead of starting a command:
> 
>  # perf record -e ... -a -P <namespace>		# create pers. events
>  # perf record -e persistent/<namespace>/ -a	# read existing buffers
>  # perf record -e persistent/<namespace>/ -a -k	# read and kill existing events
> 
> Note that no args for a command are given.

Yep, looks sane to me.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  parent reply	other threads:[~2014-05-06 18:58 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 15:04 [PATCH v4 00/16] perf, persistent: Add persistent events Jean Pihet
2014-04-07 15:04 ` [PATCH 01/16] perf, mmap: Factor out ring_buffer_detach_all() Jean Pihet
2014-04-07 15:04 ` [PATCH 02/16] perf, mmap: Factor out try_get_event()/put_event() Jean Pihet
2014-04-07 15:04 ` [PATCH 03/16] perf, mmap: Factor out perf_alloc/free_rb() Jean Pihet
2014-04-22 14:25   ` Peter Zijlstra
2014-04-07 15:04 ` [PATCH 04/16] perf, mmap: Factor out perf_get_fd() Jean Pihet
2014-04-22 14:27   ` Peter Zijlstra
2014-04-25 13:54     ` Robert Richter
2014-04-25 14:43       ` Peter Zijlstra
2014-04-25 14:52         ` Peter Zijlstra
2014-04-29 15:34           ` Robert Richter
2014-04-07 15:04 ` [PATCH 05/16] perf: Add persistent events Jean Pihet
2014-04-07 15:04 ` [PATCH 06/16] mce, x86: Enable " Jean Pihet
2014-04-07 15:04 ` [PATCH 07/16] perf, persistent: Implementing a persistent pmu Jean Pihet
2014-04-07 15:04 ` [PATCH 08/16] perf, persistent: Exposing persistent events using sysfs Jean Pihet
2014-04-07 15:04 ` [PATCH 09/16] perf, persistent: Use unique event ids Jean Pihet
2014-04-07 15:04 ` [PATCH 10/16] perf, persistent: Implement reference counter for events Jean Pihet
2014-04-07 15:04 ` [PATCH 11/16] perf, persistent: Dynamically resize list of sysfs entries Jean Pihet
2014-04-07 15:04 ` [PATCH 12/16] perf, persistent: ioctl functions to control persistency Jean Pihet
2014-04-07 15:04 ` [PATCH 13/16] perf tools: Rename flex conditions to avoid name conflicts Jean Pihet
2014-04-07 15:04 ` [PATCH 14/16] perf tools: Modify event parser to update event attribute by index Jean Pihet
2014-04-07 15:04 ` [PATCH 15/16] perf tools: Add attr<num> syntax to event parser Jean Pihet
2014-04-07 15:04 ` [PATCH 16/16] perf tools: Retry mapping buffers readonly on EACCES Jean Pihet
2014-04-17 12:44 ` [PATCH v4 00/16] perf, persistent: Add persistent events Jean Pihet
2014-04-17 12:50   ` Borislav Petkov
2014-04-17 13:17     ` Jean Pihet
2014-04-17 13:21       ` Borislav Petkov
2014-04-22  8:20         ` Jean Pihet
2014-04-22 10:07           ` Jean Pihet
2014-04-22 10:20             ` Borislav Petkov
2014-05-06 12:39 ` Robert Richter
2014-05-06 18:50   ` Borislav Petkov
2014-05-06 18:53   ` Borislav Petkov
2014-05-07 16:44     ` Robert Richter
2014-05-08 18:23       ` Borislav Petkov
2014-05-09  9:17         ` Robert Richter
2014-05-06 18:58   ` Borislav Petkov [this message]
2014-05-07 17:01     ` Robert Richter
2014-05-08 18:36       ` Borislav Petkov
2014-05-09  8:52         ` Robert Richter
2014-05-09 10:17       ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140506185826.GF25013@pd.tnic \
    --to=bp@alien8.de \
    --cc=acme@infradead.org \
    --cc=jean.pihet@linaro.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rric@kernel.org \
    --cc=tomasz.nowicki@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox