[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230823055653.2964237-1-tero.kristo@linux.intel.com>
Date: Wed, 23 Aug 2023 08:56:51 +0300
From: Tero Kristo <tero.kristo@...ux.intel.com>
To: dave.hansen@...ux.intel.com, tglx@...utronix.de, x86@...nel.org,
bp@...en8.de
Cc: artem.bityutskiy@...ux.intel.com, acme@...nel.org,
bpf@...r.kernel.org, namhyung@...nel.org, mingo@...hat.com,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
irogers@...gle.com, hpa@...or.com, mark.rutland@....com,
jolsa@...nel.org, adrian.hunter@...el.com,
alexander.shishkin@...ux.intel.com, peterz@...radead.org
Subject: [PATCH 0/2] perf/x86: Package residency counter improvements
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
Powered by blists - more mailing lists