linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Conflict when accessing PMU counters from userspace
@ 2017-09-07 19:36 Jason Teplitz
  2017-09-08 10:28 ` Mark Rutland
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Teplitz @ 2017-09-07 19:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I'm reading the PMU counters from a userspace process, but the cycle
counter keeps getting reset. I don't believe any other running
processes are doing this. Is there something in the kernel that resets
the cycle counter periodically and if so is there an easy way to
disable it?

-Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Conflict when accessing PMU counters from userspace
  2017-09-07 19:36 Conflict when accessing PMU counters from userspace Jason Teplitz
@ 2017-09-08 10:28 ` Mark Rutland
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Rutland @ 2017-09-08 10:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 07, 2017 at 12:36:48PM -0700, Jason Teplitz wrote:
> Hello,

Hi,

> I'm reading the PMU counters from a userspace process, but the cycle
> counter keeps getting reset. I don't believe any other running
> processes are doing this. Is there something in the kernel that resets
> the cycle counter periodically and if so is there an easy way to
> disable it?

Reading the PMU counters directly from userspace is not supported, and
we configure the CPU to trap such accesses.

Ignoring explicit reset of the counters, there are a number of reasons
why you will not see consistent values from userspace.

Which kernel are you using (e.g. version? arm/arm64?), and how have you
enabled userspace access?

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-08 10:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07 19:36 Conflict when accessing PMU counters from userspace Jason Teplitz
2017-09-08 10:28 ` Mark Rutland

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).