lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87qzsudij9.fsf@oracle.com>
Date: Mon, 15 Dec 2025 22:53:30 -0800
From: Ankur Arora <ankur.a.arora@...cle.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: James Clark <james.clark@...aro.org>,
        Arnaldo Carvalho de Melo
 <acme@...nel.org>,
        Ian Rogers <irogers@...gle.com>, Jiri Olsa
 <jolsa@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Peter
 Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>,
        LKML
 <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org,
        Ankur
 Arora <ankur.a.arora@...cle.com>
Subject: Re: [PATCH] perf bench: Add -t/--threads option to perf bench mem mmap


Namhyung Kim <namhyung@...nel.org> writes:

> Hi James,
>
> On Tue, Dec 09, 2025 at 01:01:25PM +0000, James Clark wrote:
>>
>>
>> On 07/12/2025 8:57 am, Namhyung Kim wrote:
>> > So that it can measure overhead of mmap_lock and/or per-VMA lock
>> > contention.
>> >
>> >    $ perf bench mem mmap -f demand -l 1000 -t 1
>> >    # Running 'mem/mmap' benchmark:
>> >    # function 'demand' (Demand loaded mmap())
>> >    # Copying 1MB bytes ...
>> >
>> >           2.914503 GB/sec
>> >
>> >    $ perf bench mem mmap -f demand -l 1000 -t 2
>> >    # Running 'mem/mmap' benchmark:
>> >    # function 'demand' (Demand loaded mmap())
>> >    # Copying 1MB bytes ...
>> >
>> >         888.769991 MB/sec
>> >
>> >    $ perf bench mem mmap -f demand -l 1000 -t 3
>> >    # Running 'mem/mmap' benchmark:
>> >    # function 'demand' (Demand loaded mmap())
>> >    # Copying 1MB bytes ...
>> >
>> >         757.658220 MB/sec
>> >
>> >    $ perf bench mem mmap -f demand -l 1000 -t 4
>> >    # Running 'mem/mmap' benchmark:
>> >    # function 'demand' (Demand loaded mmap())
>> >    # Copying 1MB bytes ...
>> >
>> >         316.410713 MB/sec
>>
>> Should this now say "MB/sec per thread" for nr_threads > 1? I think it could
>> be interpreted either way without a label, but I see you divided by
>> nr_threads in timeval2double().
>
> Right, thanks for the review.  I think we can add it unconditionally.

Seconding the MB/sec per thread thing. But how about also adding some
kind of a variance indicator?

Maybe something like this:

   $ perf bench mem mmap -f demand -l 1000 -t 4
    # Running 'mem/mmap' benchmark:
    # function 'demand' (Demand loaded mmap())
    # Copying 1MB bytes ...

         316.410713 MB/sec/thread        ( +-  0.56% )

--
ankur

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ