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>] [day] [month] [year] [list]
Message-ID: <CAP-5=fX8+nyvisxybD6gWBhJd=GpuMiBkSA+CqnLuUc7Mx2KHw@mail.gmail.com>
Date: Tue, 6 May 2025 13:51:18 -0700
From: Ian Rogers <irogers@...gle.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Howard Chu <howardchu95@...il.com>, 
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Peter Zijlstra <peterz@...radead.org>, 
	Kan Liang <kan.liang@...ux.intel.com>, 
	linux-perf-users <linux-perf-users@...r.kernel.org>, 
	Linux Kernel Mailing List <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 Tue, May 6, 2025 at 1:03 PM Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
>
>
>
> On Tue, May 6, 2025, 4:48 PM Ian Rogers <irogers@...gle.com> wrote:
>>
>> 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.
>
>
>
> It was a misunderstanding, I already pushed everything to perf-tools-next an removed that FIXME, that was here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/commit/?h=perf-tools-next&id=7f8f56475d58511729429b2e52787606c4062ad0
>
> Next thing I plan to look is that DRM PMU (IIRC) from you.

Great thanks! Looking back over the last few months we also have
(somewhat priority sorted - probably best to fix crashes ahead of the
new DRM work :-) ):
* The second patch of Wshorten changes to help Leo:
https://lore.kernel.org/lkml/20250430175036.184610-1-irogers@google.com/
* segv in PMU fix (acked-by Namhyung):
https://lore.kernel.org/lkml/20250402211301.4153441-1-irogers@google.com/
* memory leak in perf trace (reviewed-by Howard):
https://lore.kernel.org/lkml/20250401202715.3493567-1-irogers@google.com/
* event parsing NMI watchdog/debug improvements (reviewed-by Kan) :
https://lore.kernel.org/lkml/18c2fb33-2b3a-4ebe-ab26-8cebe0b6b94c@linux.intel.com/
* Rust demangling (no tags):
https://lore.kernel.org/lkml/20250430004128.474388-1-irogers@google.com/
* Speed ups in PMU/metric code but particularly for testing (tested-by
Namhyung): https://lore.kernel.org/lkml/Z_dp7E2wtSek-KHo@z2/
* Stat testing improvements (no tags):
https://lore.kernel.org/lkml/20250412004704.2297939-1-irogers@google.com/
* Cpu term (tested-by Kan):
https://lore.kernel.org/lkml/c21d05c6-d71c-47e3-b4a2-e275d9d487f2@linux.intel.com/
* Uniquification fixes/clean-up (no tags by CT/me):
https://lore.kernel.org/lkml/20250327225651.642965-1-ctshao@google.com/
* Branch stack test hardening (no tags):
https://lore.kernel.org/lkml/20250318161639.34446-1-irogers@google.com/

Perhaps more controversial:
* Uid filtering with BPF:
https://lore.kernel.org/lkml/20250425214008.176100-1-irogers@google.com/
* dlopen/dlsym for capstone and libllvm:
https://lore.kernel.org/lkml/20250417230740.86048-1-irogers@google.com/
* BuildID mmaps as default:
https://lore.kernel.org/lkml/20250428213409.1417584-1-irogers@google.com/
* Sysfs/json event priority consistency:
https://lore.kernel.org/lkml/20250416045117.876775-1-irogers@google.com/
* Build with Wunreachable-code:
https://lore.kernel.org/lkml/20250410202647.1899125-1-irogers@google.com/

Thanks,
Ian

> Thanks for doing the extra tests and reporting your results,
>
> - Arnaldo
>
> Sent from smartphone, doing some routine med checks
>
>
>> 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