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] [day] [month] [year] [list]
Message-ID: <CAP-5=fXMwyGm5KUecSS4pUhgBB_py=R_c0LqEYfnjyRrf4bcMQ@mail.gmail.com>
Date: Tue, 6 May 2025 12:48:19 -0700
From: Ian Rogers <irogers@...gle.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Howard Chu <howardchu95@...il.com>, mingo@...hat.com, namhyung@...nel.org, 
	mark.rutland@....com, alexander.shishkin@...ux.intel.com, jolsa@...nel.org, 
	adrian.hunter@...el.com, peterz@...radead.org, kan.liang@...ux.intel.com, 
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org, 
	gautam@...ux.ibm.com
Subject: Re: [PATCH v16 00/10] perf record --off-cpu: Dump off-cpu samples directly

On Mon, May 5, 2025 at 8:56 AM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>
> On Wed, Apr 30, 2025 at 07:27:58PM -0700, Howard Chu wrote:
> > Changes in v16:
> >  - Add Tested-by from Gautam and Acked-by from Namhyung.
> >  - Rebase on the perf-tools-next branch.
> >  - Edit the commit message of patch 10.
> >  - Fix a bug caused by the type change of struct perf_cpu.
> >  - Rename test_offcpu_over_thresh() to test_offcpu_above_thresh().
>
> Please take a look at the tmp.perf-tools-next branch at:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
>
> I added some Committer testing with some extra steps to describe how to
> reproduce the results and there is one point that I have to retest,
> where there is a FIXME in the Committer testing notes, perhaps I made a
> mistake or that fix should be moved to after or before some patch,
> unsure.

Hi Arnaldo,

so I tried out the tree, perf tests pass as usual, etc. I tried to dig
into your FIXME issue. Initially I thought I had a reproduction but
now I think it was a user error. So I wrote a little script where
we're setting the off CPU threshold to 10 seconds and then looking for
off CPU events that took less than than:
```
for i in $(seq 1 100)
do
  echo -n "Iteration $i of 100 "
  sudo /tmp/perf/perf record --off-cpu --off-cpu-thresh 10000 -a sleep
11 2> /dev/null
  if sudo /tmp/perf/perf script -D |grep -P '.* [0-9]{1,10} offcpu.*'
  then
    echo "BAD"
  else
    echo "GOOD"
  fi
done
```
To remove the BPF map generated events I added:
```
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 8898357325cf..6c23b2cf8b66 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -2841,7 +2841,7 @@ static int __cmd_record(struct record *rec, int
argc, const char **argv)
       } else
               status = err;

-       if (rec->off_cpu)
+       if (rec->off_cpu && false)
               rec->bytes_written += off_cpu_write(rec->session);

       record__read_lost_samples(rec);
```
Anyway, running the script for nearly 20 minutes, I couldn't get a
sample below the threshold. Hand testing things also look correct.

Thanks,
Ian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ