Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1] perf tests: Restore -p flag to lock contention test
Date: Wed, 08 Jul 2026 17:59:47 +0000	[thread overview]
Message-ID: <20260708175948.567701F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708175311.858850-1-irogers@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Adding the `-p` (pipe) flag to the global workload unconditionally disables the stack filter tests.
--

--- Patch [1]: [PATCH v1] perf tests: Restore -p flag to lock contention test ---
commit b4bb7054950dea7123c601308622ddcd596c94cf
Author: Ian Rogers <irogers@google.com>

perf tests: Restore -p flag to lock contention test

This commit restores the -p flag to the perf bench sched messaging workload
used by the lock contention test. By defaulting to pipes instead of
socketpairs, it ensures architectures like s390 generate sufficient lock
events for the BPF trace filtering logic to pass.

> diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh
> index ba598370be738..5df9a0cd48a34 100755
> --- a/tools/perf/tests/shell/lock_contention.sh
> +++ b/tools/perf/tests/shell/lock_contention.sh
> @@ -11,7 +11,8 @@ errout=$(mktemp /tmp/__perf_test.errout.XXXXX)
>  
>  # Workload to generate lock contention.
>  # Using 1 group (-g 1) keeps runtime low while generating sufficient lock events.
> -msg_workload="perf bench sched messaging -g 1"
> +# We include -p (pipes) because socketpairs don't generate enough lock events on s390.
> +msg_workload="perf bench sched messaging -g 1 -p"

[Severity: Medium]
Will adding the -p flag cause test_stack_filter() and 
test_aggr_task_stack_filter() to unconditionally skip?

These tests explicitly verify filtering behavior by searching for unix_stream 
locks in tools/perf/tests/shell/lock_contention.sh:

test_stack_filter()
{
	echo "Testing perf lock contention --callstack-filter (w/ unix_stream)"
	perf lock contention -i ${perfdata} -v -q 2> ${result}
	if [ "$(grep -c unix_stream "${result}")" = "0" ]; then
		echo "[Skip] Could not find 'unix_stream'"
		return
	fi

Since pipes use pipe locks instead of AF_UNIX stream socket locks 
(unix_stream), the shared perfdata profile will no longer contain these locks. 

Does this mean we lose test suite coverage for the --callstack-filter option 
across all architectures because the grep will always return 0?

>  
>  cleanup() {
>  	rm -f ${perfdata}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260708175311.858850-1-irogers@google.com?part=1

  reply	other threads:[~2026-07-08 17:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 17:53 [PATCH v1] perf tests: Restore -p flag to lock contention test Ian Rogers
2026-07-08 17:59 ` sashiko-bot [this message]
2026-07-08 23:41   ` Namhyung Kim
2026-07-09  5:42 ` Thomas Richter
2026-07-10 21:48 ` Namhyung Kim

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=20260708175948.567701F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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