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: <CAH0uvoh7dcMN7BjzHspEdd3+HgQza1wgNxctGvxFKmOjVCrh7g@mail.gmail.com>
Date: Tue, 18 Feb 2025 16:58:40 -0800
From: Howard Chu <howardchu95@...il.com>
To: Ian Rogers <irogers@...gle.com>
Cc: acme@...nel.org, namhyung@...nel.org, jolsa@...nel.org, 
	adrian.hunter@...el.com, linux-perf-users@...r.kernel.org, 
	linux-kernel@...r.kernel.org, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Ingo Molnar <mingo@...hat.com>, 
	James Clark <james.clark@...aro.org>, Kan Liang <kan.liang@...ux.intel.com>, 
	Mark Rutland <mark.rutland@....com>, Peter Zijlstra <peterz@...radead.org>, 
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH v15 10/10] perf test: Add direct off-cpu test

Hello Ian,

Thanks for testing this patch :).

On Tue, Feb 18, 2025 at 11:32 AM Ian Rogers <irogers@...gle.com> wrote:
>
> On Thu, Feb 13, 2025 at 3:04 PM Howard Chu <howardchu95@...il.com> wrote:
> >
> > Hello,
> >
> > On Thu, Feb 13, 2025 at 3:00 PM Howard Chu <howardchu95@...il.com> wrote:
> > >
> > > Why is there a --off-cpu-thresh 2000?
> > >
> > > We collect an off-cpu period __ONLY ONCE__, either in direct sample form,
> > > or in accumulated form (in BPF stack trace map).
> > >
> > > If I don't add --off-cpu-thresh 2000, the sample in the original test
> > > goes into the ring buffer instead of the BPF stack trace map.
> > >
> > > Additionally, when using -e dummy, the ring buffer is not open, causing
> > > us to lose a sample.
> >
> > Just noticed that this commit message is wrong, should be:
> > """
> > Add tests for direct off-cpu samples and --off-cpu-thresh option.
> > """
>
> Tested-by: Ian Rogers <irogers@...gle.com>
> ```
> 121: perf record offcpu profiling tests                              : Ok
> ```
> I'd be tempted to keep the comments about why 2000 next to the actual
> code rather than in the commit message. In the code the value is 12000
> and not 2000 though?

I actually deleted the --off-cpu-thresh 2000. It was intended to fix
Namhyung's original test because I forgot to enable the off-cpu event.
Now that recording the off-cpu time of a task is fixed, that
workaround is no longer necessary. The --off-cpu-thresh 12000 option
is used to force sleep 1 to produce an at-the-end sample, as only
tasks that have been off the CPU for more than 1.2 seconds can emit
direct samples, and since this is recording an off-cpu period below
the threshold, I think it makes sense to put it here in
test_offcpu_below_thresh(). That being said, if you’d like me to add a
comment or two, I’d be glad to do so.

Thanks,
Howard

>
> Thanks,
> Ian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ