* Perf tests for hw events
@ 2015-01-22 12:40 Matt Fleming
2015-01-22 12:56 ` Jiri Olsa
2015-01-22 12:59 ` Arnaldo Carvalho de Melo
0 siblings, 2 replies; 5+ messages in thread
From: Matt Fleming @ 2015-01-22 12:40 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa
Cc: linux-kernel, Peter Zijlstra, Andi Kleen, Vince Weaver,
Vikas Shivappa, Kanaka Juvva, Ingo Molnar
Folks,
In the process of writing perf support for Intel's Cache QoS Monitoring
feature [0] I've had to write my own userland tests to drive tools/perf
and indirectly the kernel internals. I'm now getting requests for these
tests from various people and it occurs to me that they should probably
live in the kernel tree.
The tests I've got do a couple of things like setting up a perf_event
cgroup and assigning enough tasks to trigger the RMID recycling code in
the CQM driver, ensuring that we can run multiple events simultaneously
(that the event scheduling/rotation code works), etc.
Does anything like this already exist for hw events? I couldn't find
anything specific to hw events from snooping around in tools/perf/tests.
I propose we add some hw event tests to the kernel tree. These will
provide,
- regression tests
- a source of documentation for how to use the events
We should only test those hw events that are present on a user's
machine; there's no sense in emulating things.
Thoughts?
[0] - https://lkml.kernel.org/r/1415999712-5850-1-git-send-email-matt@console-pimps.org
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perf tests for hw events
2015-01-22 12:40 Perf tests for hw events Matt Fleming
@ 2015-01-22 12:56 ` Jiri Olsa
2015-01-22 17:08 ` Matt Fleming
2015-01-22 12:59 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 5+ messages in thread
From: Jiri Olsa @ 2015-01-22 12:56 UTC (permalink / raw)
To: Matt Fleming
Cc: Arnaldo Carvalho de Melo, Jiri Olsa, linux-kernel, Peter Zijlstra,
Andi Kleen, Vince Weaver, Vikas Shivappa, Kanaka Juvva,
Ingo Molnar
On Thu, Jan 22, 2015 at 12:40:14PM +0000, Matt Fleming wrote:
> Folks,
>
> In the process of writing perf support for Intel's Cache QoS Monitoring
> feature [0] I've had to write my own userland tests to drive tools/perf
> and indirectly the kernel internals. I'm now getting requests for these
> tests from various people and it occurs to me that they should probably
> live in the kernel tree.
>
> The tests I've got do a couple of things like setting up a perf_event
> cgroup and assigning enough tasks to trigger the RMID recycling code in
> the CQM driver, ensuring that we can run multiple events simultaneously
> (that the event scheduling/rotation code works), etc.
>
> Does anything like this already exist for hw events? I couldn't find
> anything specific to hw events from snooping around in tools/perf/tests.
that's the only place for this kind of stuff.. and AFAIK we use
just some basic HW events like cycles, or software events
>
> I propose we add some hw event tests to the kernel tree. These will
> provide,
>
> - regression tests
> - a source of documentation for how to use the events
yes, yes and yes ;-)
> We should only test those hw events that are present on a user's
> machine; there's no sense in emulating things.
agreed.. I remember we were discussing with Arnaldo the strengthening
of the test framework.. so it would detect what tests are runable
under current machine and priviledge
IIRC we already have some CPU detection support:
int __attribute__ ((weak)) get_cpuid(char *buffer, size_t sz);
jirka
>
> Thoughts?
>
> [0] - https://lkml.kernel.org/r/1415999712-5850-1-git-send-email-matt@console-pimps.org
>
> --
> Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perf tests for hw events
2015-01-22 12:40 Perf tests for hw events Matt Fleming
2015-01-22 12:56 ` Jiri Olsa
@ 2015-01-22 12:59 ` Arnaldo Carvalho de Melo
2015-01-22 17:11 ` Matt Fleming
1 sibling, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-01-22 12:59 UTC (permalink / raw)
To: Matt Fleming
Cc: Jiri Olsa, linux-kernel, Peter Zijlstra, Andi Kleen, Vince Weaver,
Vikas Shivappa, Kanaka Juvva, Ingo Molnar
Em Thu, Jan 22, 2015 at 12:40:14PM +0000, Matt Fleming escreveu:
> Folks,
>
> In the process of writing perf support for Intel's Cache QoS Monitoring
> feature [0] I've had to write my own userland tests to drive tools/perf
> and indirectly the kernel internals. I'm now getting requests for these
> tests from various people and it occurs to me that they should probably
> live in the kernel tree.
>
> The tests I've got do a couple of things like setting up a perf_event
> cgroup and assigning enough tasks to trigger the RMID recycling code in
> the CQM driver, ensuring that we can run multiple events simultaneously
> (that the event scheduling/rotation code works), etc.
>
> Does anything like this already exist for hw events? I couldn't find
> anything specific to hw events from snooping around in tools/perf/tests.
>
> I propose we add some hw event tests to the kernel tree. These will
> provide,
>
> - regression tests
> - a source of documentation for how to use the events
That is the description for tools/perf/tests/ please send your patches
for adding new entries there.
> We should only test those hw events that are present on a user's
> machine; there's no sense in emulating things.
At some point 'perf test' should grow infrastructure to specify what is
required for a test so that it auto-skips those, possibly not even
bothering the user telling something can't be tested. Right now for
things like tests that requires finding a vmlinux, if it doesn't find
it, it will just print "Skipped", etc.
> Thoughts?
>
> [0] - https://lkml.kernel.org/r/1415999712-5850-1-git-send-email-matt@console-pimps.org
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perf tests for hw events
2015-01-22 12:56 ` Jiri Olsa
@ 2015-01-22 17:08 ` Matt Fleming
0 siblings, 0 replies; 5+ messages in thread
From: Matt Fleming @ 2015-01-22 17:08 UTC (permalink / raw)
To: Jiri Olsa
Cc: Arnaldo Carvalho de Melo, Jiri Olsa, linux-kernel, Peter Zijlstra,
Andi Kleen, Vince Weaver, Vikas Shivappa, Kanaka Juvva,
Ingo Molnar
On Thu, 22 Jan, at 01:56:59PM, Jiri Olsa wrote:
> On Thu, Jan 22, 2015 at 12:40:14PM +0000, Matt Fleming wrote:
> > Folks,
> >
> > In the process of writing perf support for Intel's Cache QoS Monitoring
> > feature [0] I've had to write my own userland tests to drive tools/perf
> > and indirectly the kernel internals. I'm now getting requests for these
> > tests from various people and it occurs to me that they should probably
> > live in the kernel tree.
> >
> > The tests I've got do a couple of things like setting up a perf_event
> > cgroup and assigning enough tasks to trigger the RMID recycling code in
> > the CQM driver, ensuring that we can run multiple events simultaneously
> > (that the event scheduling/rotation code works), etc.
> >
> > Does anything like this already exist for hw events? I couldn't find
> > anything specific to hw events from snooping around in tools/perf/tests.
>
> that's the only place for this kind of stuff.. and AFAIK we use
> just some basic HW events like cycles, or software events
OK cool. I just wanted confirmation that tools/perf/tests was the best
place for these tests.
> > We should only test those hw events that are present on a user's
> > machine; there's no sense in emulating things.
>
> agreed.. I remember we were discussing with Arnaldo the strengthening
> of the test framework.. so it would detect what tests are runable
> under current machine and priviledge
>
> IIRC we already have some CPU detection support:
> int __attribute__ ((weak)) get_cpuid(char *buffer, size_t sz);
Aha, excellent. I hadn't noticed this. It should be possible to build
something on top of this.
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Perf tests for hw events
2015-01-22 12:59 ` Arnaldo Carvalho de Melo
@ 2015-01-22 17:11 ` Matt Fleming
0 siblings, 0 replies; 5+ messages in thread
From: Matt Fleming @ 2015-01-22 17:11 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Jiri Olsa, linux-kernel, Peter Zijlstra, Andi Kleen, Vince Weaver,
Vikas Shivappa, Kanaka Juvva, Ingo Molnar
On Thu, 22 Jan, at 09:59:52AM, Arnaldo Carvalho de Melo wrote:
>
> At some point 'perf test' should grow infrastructure to specify what is
> required for a test so that it auto-skips those, possibly not even
> bothering the user telling something can't be tested. Right now for
> things like tests that requires finding a vmlinux, if it doesn't find
> it, it will just print "Skipped", etc.
Yeah, that makes sense. I'll take a look at that.
--
Matt Fleming, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-22 17:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 12:40 Perf tests for hw events Matt Fleming
2015-01-22 12:56 ` Jiri Olsa
2015-01-22 17:08 ` Matt Fleming
2015-01-22 12:59 ` Arnaldo Carvalho de Melo
2015-01-22 17:11 ` Matt Fleming
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).