Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709846

Re: perf: multiple mmap of fd behavior on x86/ARM

From Vince Weaver <vincent.weaver@maine.edu>
Newsgroups linux.kernel
Subject Re: perf: multiple mmap of fd behavior on x86/ARM
Date 2017-08-11 19:00 +0200
Message-ID <udlrY-5XG-9@gated-at.bofh.it> (permalink)
References <ud0GS-17N-15@gated-at.bofh.it> <udf3c-2bo-9@gated-at.bofh.it> <udk2S-5cA-21@gated-at.bofh.it> <udkYX-5NJ-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

perf: multiple mmap of fd behavior on x86/ARM Vince Weaver <vincent.weaver@maine.edu> - 2017-08-10 20:50 +0200
  Re: perf: multiple mmap of fd behavior on x86/ARM Mark Rutland <mark.rutland@arm.com> - 2017-08-11 12:10 +0200
    Re: perf: multiple mmap of fd behavior on x86/ARM Peter Zijlstra <peterz@infradead.org> - 2017-08-11 13:00 +0200
      Re: perf: multiple mmap of fd behavior on x86/ARM Mark Rutland <mark.rutland@arm.com> - 2017-08-11 13:10 +0200
        Re: perf: multiple mmap of fd behavior on x86/ARM Peter Zijlstra <peterz@infradead.org> - 2017-08-11 17:00 +0200
          Re: perf: multiple mmap of fd behavior on x86/ARM Will Deacon <will.deacon@arm.com> - 2017-08-14 13:00 +0200
    Re: perf: multiple mmap of fd behavior on x86/ARM Vince Weaver <vincent.weaver@maine.edu> - 2017-08-11 17:30 +0200
      Re: perf: multiple mmap of fd behavior on x86/ARM Mark Rutland <mark.rutland@arm.com> - 2017-08-11 18:30 +0200
        Re: perf: multiple mmap of fd behavior on x86/ARM Vince Weaver <vincent.weaver@maine.edu> - 2017-08-11 19:00 +0200
          Re: perf: multiple mmap of fd behavior on x86/ARM Mark Rutland <mark.rutland@arm.com> - 2017-08-11 19:20 +0200
            Re: perf: multiple mmap of fd behavior on x86/ARM Vince Weaver <vincent.weaver@maine.edu> - 2017-08-11 21:10 +0200

csiph-web