linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [REPORT] Should rdcycle be deprecated?
@ 2025-09-09  3:13 yunhui cui
  0 siblings, 0 replies; only message in thread
From: yunhui cui @ 2025-09-09  3:13 UTC (permalink / raw)
  To: atish.patra, Anup Patel, Will Deacon, Mark Rutland, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv,
	linux-arm-kernel, linux-perf-users, lkml - Kernel Mailing List,
	Atish Patra

Hi All,

1. To use rdcycle in user mode, one must first go through
perf_user_access. However, in reality, the return value of rdcycle
remains unchanged. This is because SBI_PMU_CY_IR_MASK in SBI includes
the bit corresponding to "cycle", and the kernel's pmu_sbi_stop_all()
function disables the counting of cycles.

2. Currently, some application software (e.g., DPDK) uses the rdcycle
instruction. In fact, rdcycle is affected by WFI (Wait for Interrupt)
and CPU frequency variations.

3. Some applications mainly run on server CPUs. Therefore, the
precision design of rdtime should be higher. For example, the TSC
(Time-Stamp Counter) of x86 architectures is generally around 2 GHz,
which can meet the application's requirements for timestamp precision.

4. What are the future plans for rdcycle?

Thanks,
Yunhui

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-09  3:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09  3:13 [REPORT] Should rdcycle be deprecated? yunhui cui

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).