linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] perf/x86: Package residency counter improvements
@ 2023-08-23  5:56 Tero Kristo
  2023-08-23  5:56 ` [PATCH 1/2] perf/x86/cstate: Allow reading the package statistics from local CPU Tero Kristo
  2023-08-23  5:56 ` [PATCH 2/2] perf/core: Allow reading package events from perf_event_read_local Tero Kristo
  0 siblings, 2 replies; 3+ messages in thread
From: Tero Kristo @ 2023-08-23  5:56 UTC (permalink / raw)
  To: dave.hansen, tglx, x86, bp
  Cc: artem.bityutskiy, acme, bpf, namhyung, mingo, linux-kernel,
	linux-perf-users, irogers, hpa, mark.rutland, jolsa,
	adrian.hunter, alexander.shishkin, peterz

Hello,

Following two patches address a couple of different issues with Intel
C-state package residency counters, which are used to track power saving
state usage on Intel chips. The patches don't have any dependencies to
each other and can be applied separately.

1) The residency counters are always read from the first CPU of the
   package via an SMP call, even if they are available from any CPU.
   This causes extra latency. Patch #1 fixes this issue by flagging
   the perf event properly and allowing to execute it on any CPU of
   the package.
2) The residency counters are completely impossible to read from a BPF
   program running on any other than the first CPU of the package, as the
   SMP call is not available in this context. Patch #2 addresses this
   issue by allowing the read of the perf event from the local CPU,
   similar to what is done in perf_read_event(). This patch also allows
   reading any other package scope perf events (RAPL/UNCORE) from
   arbitrary CPUs on a package via BPF.

-Tero



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-23  5:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23  5:56 [PATCH 0/2] perf/x86: Package residency counter improvements Tero Kristo
2023-08-23  5:56 ` [PATCH 1/2] perf/x86/cstate: Allow reading the package statistics from local CPU Tero Kristo
2023-08-23  5:56 ` [PATCH 2/2] perf/core: Allow reading package events from perf_event_read_local Tero Kristo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).