lkml.org 
[lkml]   [2020]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/7] perf: arm64: Add test to check userspace access to hardware counters.
On Tue, Aug 27, 2019 at 07:17:55PM +0800, Jonathan Cameron wrote:
> On Thu, 22 Aug 2019 15:42:14 +0100
> Raphael Gault <raphael.gault@arm.com> wrote:
>
> > 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 <raphael.gault@arm.com>
>
> 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

\
 
 \ /
  Last update: 2020-06-03 18:20    [W:0.206 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site