1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/arch
Kan Liang 88ec7eedbb perf/x86: Fix low freqency setting issue
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: c46e665f03 ("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/
2025-02-25 14:54:14 +01:00
..
alpha alpha: Use str_yes_no() helper in pci_dac_dma_supported() 2025-02-14 14:06:41 -05:00
arc Kbuild updates for v6.14 2025-01-31 12:07:07 -08:00
arm Summary: 2025-01-29 10:35:40 -08:00
arm64 soc: fixes for 6.14 2025-02-21 13:16:01 -08:00
csky asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
hexagon hexagon: Fix unbalanced spinlock in die() 2025-01-30 18:46:06 -08:00
loongarch LoongArch: KVM: Set host with kernel mode when switch to VM mode 2025-02-13 12:02:56 +08:00
m68k revert "xarray: port tests to kunit" 2025-02-01 03:53:28 -08:00
microblaze asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
mips MIPS: fix mips_get_syscall_arg() for o32 2025-02-13 12:41:29 +01:00
nios2 asm-generic: pgalloc: provide generic __pgd_{alloc,free} 2025-01-25 20:22:24 -08:00
openrisc The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
parisc The various patchsets are summarized below. Plus of course many 2025-01-26 18:36:23 -08:00
powerpc powerpc/code-patching: Fix KASAN hit by not flagging text patching area as VM_ALLOC 2025-02-12 14:38:13 +05:30
riscv RISC-V Patches for the 6.14 Merge Window, Part 1 2025-01-31 15:13:25 -08:00
s390 s390/boot: Fix ESSA detection 2025-02-18 18:49:24 +01:00
sh sh updates for v6.14 2025-02-02 10:40:27 -08:00
sparc Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
um um: convert irq_lock to raw spinlock 2025-02-12 23:40:59 +01:00
x86 perf/x86: Fix low freqency setting issue 2025-02-25 14:54:14 +01:00
xtensa Xtensa updates for v6.14 2025-01-27 08:16:33 -08:00
.gitignore
Kconfig m68k: Use kernel's generic muldi3 libgcc function 2024-12-09 13:29:17 +01:00