linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	ast@kernel.org, Greg KH <gregkh@linuxfoundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-s390@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 5/6] perf/core: Use ioctl to communicate driver configuration to kernel
Date: Wed, 04 Jul 2018 13:51:22 +0300	[thread overview]
Message-ID: <87bmbn6zpx.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <CANLsYkxpLyqN76KQ3VyLq8H27hLsHxLy+zZA1xRyUXGXwx42AA@mail.gmail.com>

Mathieu Poirier <mathieu.poirier@linaro.org> writes:

> Hi Alex,

Hi Mathieu,

> On Tue, 3 Jul 2018 at 04:03, Alexander Shishkin
> <alexander.shishkin@linux.intel.com> wrote:
>>
>> On Mon, Jul 02, 2018 at 04:33:29PM -0600, Mathieu Poirier wrote:
>> > This patch follows what has been done for filters by adding an ioctl()
>> > option to communicate to the kernel arbitrary PMU specific configuration
>> > that don't fit in the conventional struct perf_event_attr to the kernel.
>>
>> Ok, so what *is* the PMU specific configuration that doesn't fit in the
>> attribute and needs to be re-configured by the driver using the generation
>> tracking?
>>
>
> In this patchset I'm am after the specification of sink information
> for each event, i.e what sink a CPU is supposed to use for the
> session.  I simply don't see putting something that PMU specific in
> the generic perf_event_attr structure.  I also intend to use the same
> ioctl mechanism to communicate complex tracer configuration for
> sequencers, counters and input events.  I don't see a nice way of
> doing that from the perf_event_attr, and that is even without thinking
> about the different flavours of tracers out there, all with their own
> features.

Yes, the sequencers and counters seem tricky. Here's a wild idea: can
the sequencer/counter configuration be expressed as an eBPF program? Or,
can an eBPF program be used to program those?

> I've looked around and the only clean way I found to support this is
> via an ioctl().  That way each tracer can easily identify the sink it
> should be using without smearing the perf_event_attr structure.  I
> would be happy to explore a different avenue should you think of
> something.

Yes, I also have something similar on my todo list and I was previously
thinking along the lines of pipe()/splice(). As in, you take the AUX
event file descriptor and feed it to the sink, at which point the trace
path is configured. I need to dig up the notes that I made back in the
day to continue this conversation in more concrete terms.

Regards,
--
Alex

  reply	other threads:[~2018-07-04 10:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 22:33 [PATCH 0/6] perf: Add ioctl for PMU driver configuration Mathieu Poirier
2018-07-02 22:33 ` [PATCH 1/6] perf tools: Use ioctl to communicate driver configuration to kernel Mathieu Poirier
2018-07-02 22:33 ` [PATCH 2/6] perf tools: Make perf_evsel accessible to PMU driver configuration code Mathieu Poirier
2018-07-02 22:33 ` [PATCH 3/6] perf tools: Use ioctl function to send sink configuration to kernel Mathieu Poirier
2018-07-02 22:33 ` [PATCH 4/6] perf/aux: Make perf_event accessible to setup_aux() Mathieu Poirier
2018-07-03  2:05   ` kbuild test robot
2018-07-03  7:31   ` Hendrik Brueckner
2018-07-03 17:37     ` Mathieu Poirier
2018-07-03  9:27   ` Alexander Shishkin
2018-07-02 22:33 ` [PATCH 5/6] perf/core: Use ioctl to communicate driver configuration to kernel Mathieu Poirier
2018-07-03 10:03   ` Alexander Shishkin
2018-07-03 10:56     ` Alexander Shishkin
2018-07-03 22:00       ` Mathieu Poirier
2018-07-04 10:34         ` Alexander Shishkin
2018-07-04 21:39           ` Mathieu Poirier
2018-07-03 20:30     ` Mathieu Poirier
2018-07-04 10:51       ` Alexander Shishkin [this message]
2018-07-03 22:03     ` Mathieu Poirier
2018-07-03 13:40   ` Jiri Olsa
2018-07-03 17:47     ` Mathieu Poirier
2018-07-03 13:41   ` Jiri Olsa
2018-07-02 22:33 ` [PATCH 6/6] coresight: Use PMU driver configuration for sink selection Mathieu Poirier

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=87bmbn6zpx.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ast@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).