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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0irO1zmh=un+8vDQ8h2k-sHFTpCPCwr=iVRPcozHMRKHA@mail.gmail.com>
Date: Thu, 4 Dec 2025 18:24:57 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Christian Loehle <christian.loehle@....com>, 
	Samuel Wu <wusamuel@...gle.com>, Huang Rui <ray.huang@....com>, 
	"Gautham R. Shenoy" <gautham.shenoy@....com>, Mario Limonciello <mario.limonciello@....com>, 
	Perry Yuan <perry.yuan@....com>, Jonathan Corbet <corbet@....net>, 
	Viresh Kumar <viresh.kumar@...aro.org>, Masami Hiramatsu <mhiramat@...nel.org>, 
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>, Len Brown <lenb@...nel.org>, 
	Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, 
	Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>, 
	Yonghong Song <yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>, 
	KP Singh <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, 
	Jiri Olsa <jolsa@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Ian Rogers <irogers@...gle.com>, 
	Adrian Hunter <adrian.hunter@...el.com>, James Clark <james.clark@...aro.org>, 
	kernel-team@...roid.com, linux-pm@...r.kernel.org, linux-doc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
	bpf@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH v3 1/2] cpufreq: Replace trace_cpu_frequency with trace_policy_frequency

On Thu, Dec 4, 2025 at 5:48 PM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Thu, 4 Dec 2025 15:57:41 +0100
> "Rafael J. Wysocki" <rafael@...nel.org> wrote:
>
> > > perf timechart seem to do per-CPU reporting though?
> > > So this is broken by not emitting an event per-CPU? At least with a simple s/cpu_frequency/policy_frequency/
> > > like here.
> > > Similar for the bpf samples technically...
> >
> > This kind of boils down to whether or not tracepoints can be regarded
> > as ABI and to what extent.
>
> They are an ABI and they are not an ABI. It really boils down to "if you
> break the ABI but no user space notices, did you really break the ABI?" the
> answer is "no". But if user space notices, then yes you did. But it is
> possible to still fix user space (I did this with powertop).

My concern is that the patch effectively removes one trace point
(cpu_frequency) and adds another one with a different format
(policy_frequency), updates one utility in the kernel tree and expects
everyone else to somehow know that they should switch over.

I know about at least several people who have their own scripts using
this tracepoint though.

> >
> > In this particular case, I'm not sure I agree with the stated motivation.
> >
> > First of all, on systems with one CPU per cpufreq policy (the vast
> > majority of x86, including AMD, and the ARM systems using the CPPC
> > driver AFAICS), the "issue" at hand is actually a non-issue and
> > changing the name of the tracepoint alone would confuse things in user
> > space IIUC.  Those need to work the way they do today.
>
> If the way the tracepoint changes, it's best to change the name too.
> Tooling can check to see which name is available to determine how to
> process the traces.

If it is updated to do so, yes, but in the meantime?

> >
> > On systems with multiple CPUs per cpufreq policy there is some extra
> > overhead related to the cpu_frequency tracepoint, but the if someone
> > is only interested in the "policy" frequency, they can filter out all
> > CPUs belonging to the same policy except for one from the traces,
> > don't they?
>
> I'm not exactly sure what you mean here. There is an "onchange" trigger you
> can use to trigger a synthetic event whenever a change happens. But I think
> the data here wants to know which CPU had its policy change. Hence the CPU
> mask.

IIUC he wants to trace frequency changes per policy, not per CPU
(because there are cases in which multiple CPUs belong to one policy
and arguably the frequency doesn't need to be traced for all of them),
but tooling should know which CPUs belong to the same policy, so it
should be straightforward to use that knowledge when processing the
traces.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ