diff options
| author | Kan Liang <kan.liang@linux.intel.com> | 2025-01-17 07:19:11 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-07 18:25:38 +0100 |
| commit | bf6e873ad7326ca8edc2758f458aa2fe7e433077 (patch) | |
| tree | 3423970bf75fc2cdbbbce3418ae3912062ddfa8a /scripts/objdiff | |
| parent | a2475ccad6120546ea45dbcd6cd1f74dc565ef6b (diff) | |
| download | linux-bf6e873ad7326ca8edc2758f458aa2fe7e433077.tar.gz linux-bf6e873ad7326ca8edc2758f458aa2fe7e433077.tar.bz2 linux-bf6e873ad7326ca8edc2758f458aa2fe7e433077.zip | |
perf/x86: Fix low freqency setting issue
commit 88ec7eedbbd21cad38707620ad6c48a4e9a87c18 upstream.
Perf doesn't work at low frequencies:
$ perf record -e cpu_core/instructions/ppp -F 120
Error:
The sys_perf_event_open() syscall returned with 22 (Invalid argument)
for event (cpu_core/instructions/ppp).
"dmesg | grep -i perf" may provide additional information.
The limit_period() check avoids a low sampling period on a counter. It
doesn't intend to limit the frequency.
The check in the x86_pmu_hw_config() should be limited to non-freq mode.
The attr.sample_period and attr.sample_freq are union. The
attr.sample_period should not be used to indicate the frequency mode.
Fixes: c46e665f0377 ("perf/x86: Add INST_RETIRED.ALL workarounds")
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250117151913.3043942-1-kan.liang@linux.intel.com
Closes: https://lore.kernel.org/lkml/20250115154949.3147-1-ravi.bangoria@amd.com/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
