Thread (11 messages) 11 messages, 3 authors, 2020-06-03

Re: [PATCH v4 1/7] perf: arm64: Add test to check userspace access to hardware counters.

From: Rob Herring <robh@kernel.org>
Date: 2020-06-03 16:19:25
Also in: lkml

On Tue, Aug 27, 2019 at 07:17:55PM +0800, Jonathan Cameron wrote:
On Thu, 22 Aug 2019 15:42:14 +0100
Raphael Gault [off-list ref] wrote:
quoted
This test relies on the fact that the PMU registers are accessible
from userspace. It then uses the perf_event_mmap_page to retrieve
the counter index and access the underlying register.

This test uses sched_setaffinity(2) in order to run on all CPU and thus
check the behaviour of the PMU of all cpus in a big.LITTLE environment.

Signed-off-by: Raphael Gault <redacted>
Hi Raphael,

I just tested this on 1620 and it works fairly nicely with one exception...
I'm working on reviving this series.
The test will run and generate garbage numbers if the rest of the
series isn't yet applied to the kernel.  Is there anything we can do
to prevent that?
I've added a check that user access is enabled which should prevent 
that. It also validates pmc_width is set which was missing in this 
series.
It's a slightly silly complaint, but this also take a while compared to all 
the other tests if you have lots of cores, so maybe a slightly shorter
test?
I'm not sure what the value of running on every core was supposed to be. 
If we want to check big.LITTLE, then the test should detect that and 
pass if user access is disabled on all cores. If we're not on 
big.LITTLE, then I don't see the point in this test running on every 
core.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help