mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vince Weaver <vincent.weaver@maine.edu>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: perf: multiple mmap of fd behavior on x86/ARM
Date: Fri, 11 Aug 2017 12:51:12 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1708111244570.2445@macbook-air> (raw)
In-Reply-To: <20170811162318.GA22445@leverpostej>

On Fri, 11 Aug 2017, Mark Rutland wrote:

> IIRC, patches were sent back in 2014, but as I mentioned above, those
> were far from suitable for upstream, even ignoring cases like
> big.LITTLE. Said patches were never reworked and reposted.

Here's the commit message in the perf_event_tests tree, having trouble 
finding the original e-mail that went with it.

commit 2cc2e21e349243889ba59408527cc1a97dd0dc44
Author: Yogesh Tillu <yogesh.tillu@linaro.org>
Date:   Tue Mar 1 14:18:22 2016 +0530

    Add support for RDPMC test with mmap way
    
    This test adds support for reading perf hw counter from userspace.
    Method (2)
    rdpmc_comparision_mmap:
    Test read perf hw counter in userspace using open/mmap syscall.
    It requires kernel with perf mmap patchset and
    echo 1 > /sys/bus/platform/drivers/armv8-pmu/rdpmc
    
    Above Method Tested On:(X86/ARM)
    It is tested with perf mmap patchset on kernel v4.5.0-rc5+
    With above Tests, we can benchmark access of perf hw counters in
    userspace with syscall vs perf_event_mmap_page way.
    
    Signed-off-by: Yogesh Tillu <yogesh.tillu@linaro.org>



> Just to check, how does x86 behave on each of those kernel releases?
> 
> Many things have changed since v4.4.

I'm fairly sure this test (well, the equivelent code in 
tests/record_sample/record_mmap that I based the test on) has been passing 
on all of my x86 test machines since ~3.10 or so, or else I would noticed.

If I can get a custom kernel to boot on one of my machines I can start 
digging in and see if I can find where the EINVAL comes from.

This isn't some key thing that needs to be fixed, I was just curious about 
the behavior difference between x86 and ARM.  There are a few other minor 
x86/ARM diferences, especially realting to perf_event_open() error 
returns, that I had to special case in a few of my tests.

Vince

  reply	other threads:[~2017-08-11 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 18:48 Vince Weaver
2017-08-11 10:01 ` Mark Rutland
2017-08-11 10:52   ` Peter Zijlstra
2017-08-11 11:06     ` Mark Rutland
2017-08-11 14:53       ` Peter Zijlstra
2017-08-14 10:57         ` Will Deacon
2017-08-11 15:25   ` Vince Weaver
2017-08-11 16:23     ` Mark Rutland
2017-08-11 16:51       ` Vince Weaver [this message]
2017-08-11 17:09         ` Mark Rutland
2017-08-11 19:01           ` Vince Weaver

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=alpine.DEB.2.20.1708111244570.2445@macbook-air \
    --to=vincent.weaver@maine.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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

all inboxes | Powered by JetHome®