mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH -v2 0/4] Persistent events
Date: Tue, 21 Aug 2012 15:11:36 +0200	[thread overview]
Message-ID: <20120821131136.GC21432@aftab.osrc.amd.com> (raw)
In-Reply-To: <1345545050.23018.95.camel@twins>

On Tue, Aug 21, 2012 at 12:30:50PM +0200, Peter Zijlstra wrote:
> Good progress there, there's still a few things though:
> 
>  - the point also raised by Steven, I'm pretty sure that the placing of
>    the debugfs files unfortunate. I would much rather see something
>    like /debug/perf/persistent/$foo, also dropping your
>    perf_event_desc::dir_name.

Ok, how do we want to do the per-CPU layout there? Like this:

/debug/perf/persistent/mce_record0
/debug/perf/persistent/mce_record1
...

or rather

/debug/perf/persistent/cpu0/mce_record
/debug/perf/persistent/cpu1/mce_record

?

The thing is, I'm not sure we want to make persistent events per-CPU
implicitly. If yes, then the second layout would fit better. Hmm.

>  - I would make perf_add_persistent_on_cpu() static and create
>  something like perf_add_persistent() which iterates all CPUs and
>  creates: "%s-%04d", perf_event_desc::fname, cpu.

Ok.

> This needs a little extra for cpu-hotplug, not sure what to do there.

get/put_online_cpus()?

and then maybe check whether some of the CPUs are offline and warn if
so?

>  - related to the first point, by not tying them to actual events
>  you can create a persistent 'event' that contains multiple events.
>  Its quite possible to create multiple kernel events and use the
>  equivalent of PERF_EVENT_IOC_SET_OUTPUT on them to the exposed FD.

Hm, interesting.

So, in that case, the persistent thing would have a per-CPU buffer and
a file descriptor connected to it and one would be able to add events
which would log into the per-CPU buffer. Ok.

>  - It might be good to provide means of changing the persistent
>  event's buffer size, or maybe even 'destroy' persistent buffers.

ioctl? Or something else?

Thanks.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

  reply	other threads:[~2012-08-21 13:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 17:45 Borislav Petkov
2012-08-16 17:45 ` [RFC PATCH -v2 1/4] trace events: Interface to add files to debugfs Borislav Petkov
2012-08-16 22:06   ` Steven Rostedt
2012-08-17  7:26     ` Borislav Petkov
2012-08-16 17:45 ` [RFC PATCH -v2 2/4] perf: Add persistent events Borislav Petkov
2012-08-16 17:45 ` [RFC PATCH -v2 3/4] perf: Add persistent event facilities Borislav Petkov
2012-08-16 22:12   ` Steven Rostedt
2012-08-17  7:27     ` Borislav Petkov
2012-12-09 12:06     ` Borislav Petkov
2012-08-21 10:08   ` Peter Zijlstra
2012-08-21 10:21   ` Peter Zijlstra
2012-08-16 17:45 ` [RFC PATCH -v2 4/4] persistent test Borislav Petkov
2012-08-16 20:12 ` [RFC PATCH -v2 0/4] Persistent events Jonathan Corbet
2012-08-16 20:55   ` Borislav Petkov
2012-08-16 21:13     ` Steven Rostedt
2012-08-16 21:41       ` Borislav Petkov
2012-08-16 22:00         ` Steven Rostedt
2012-08-17  7:38           ` Borislav Petkov
2012-08-17 15:20             ` Steven Rostedt
2012-08-17 17:06               ` Peter Zijlstra
2012-08-21 10:30 ` Peter Zijlstra
2012-08-21 13:11   ` Borislav Petkov [this message]
2012-08-21 13:41     ` Steven Rostedt
2012-08-21 13:50       ` Borislav Petkov
2012-08-21 14:03         ` Steven Rostedt

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=20120821131136.GC21432@aftab.osrc.amd.com \
    --to=bp@amd64.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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

Powered by JetHome