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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250916141811.GK3245006@noisy.programming.kicks-ass.net>
Date: Tue, 16 Sep 2025 16:18:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Yuzhuo Jing <yuzhuo@...gle.com>, Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Liang Kan <kan.liang@...ux.intel.com>, Yuzhuo Jing <yzj@...ch.edu>,
	Andrea Parri <parri.andrea@...il.com>,
	Palmer Dabbelt <palmer@...osinc.com>,
	Charlie Jenkins <charlie@...osinc.com>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Kumar Kartikeya Dwivedi <memxor@...il.com>,
	Alexei Starovoitov <ast@...nel.org>,
	Barret Rhoden <brho@...gle.com>,
	Alexandre Ghiti <alexghiti@...osinc.com>,
	Guo Ren <guoren@...nel.org>, linux-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v1 0/7] perf bench: Add qspinlock benchmark

On Mon, Aug 04, 2025 at 03:28:12PM +0100, Mark Rutland wrote:
> On Mon, Jul 28, 2025 at 07:26:33PM -0700, Yuzhuo Jing wrote:
> > As an effort to improve the perf bench subcommand, this patch series
> > adds benchmark for the kernel's queued spinlock implementation.
> > 
> > This series imports necessary kernel definitions such as atomics,
> > introduces userspace per-cpu adapter, and imports the qspinlock
> > implementation from the kernel tree to tools tree, with minimum
> > adaptions.
> 
> Who is this intended to be useful for, and when would they use this?
> 
> This doesn't serve as a benchmark of the host kernel, since it tests
> whatever stale copy of the qspinlock code was built into the perf
> binary.
> 
> I can understand that being able to test the code in userspace may be
> helpful when making some changes, but why does this need to be built
> into the perf tool?

Right, I think most of us already have a userspace version of it. I have
a thingy that has TAS, TICKET and QSPINLOCK wrapped in a perf self
monitor that I can run on various x86_64 to see how it behaves.

IIRC it also has a pile of 'raw' atomic ops to see the contention
behaviour. This shows that eg. XADD is *waay* nicer than a CMPXCHG loop
when heavily contended.

Anyway, that lives as a random tar file on a random machine in my house,
I'm not sure it makes much sense to stick that in perf as such. Rather
specific.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ