BPF List
 help / color / mirror / Atom feed
* bpf: RFC for platform specific BPF helper addition
@ 2023-02-23 13:20 Tero Kristo
  2023-02-23 17:46 ` Alexei Starovoitov
  0 siblings, 1 reply; 7+ messages in thread
From: Tero Kristo @ 2023-02-23 13:20 UTC (permalink / raw)
  To: bpf

Hi,

Some background first; on x86 platforms there is a free running TSC 
counter which can be used to generate extremely accurate profiling time 
stamps. Currently this can be used by BPF programs via hooking into perf 
subsystem and reading the value there; however this reduces the accuracy 
due to latency + jitter involved with long execution chain, and also the 
timebase gets converted into relative from the start of the execution of 
the program, instead of getting an absolute system level value.

Now, I do have a pretty trivial patch (under internal review atm. at 
Intel) that adds an x86 platform specific bpf helper that can directly 
read this timestamp counter without relying to perf subsystem hooks.

Do people have any feedback / insights on this list about addition of 
such platform specific BPF helper, basically thumbs up/down for adding 
such a thing? Currently I don't think there are any platform specific 
helpers in the kernel.

-Tero


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

end of thread, other threads:[~2023-03-01 12:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 13:20 bpf: RFC for platform specific BPF helper addition Tero Kristo
2023-02-23 17:46 ` Alexei Starovoitov
2023-02-24 11:49   ` Tero Kristo
2023-02-25  0:01     ` Alexei Starovoitov
2023-02-28  9:45       ` Tero Kristo
2023-03-01  6:04         ` Alexei Starovoitov
2023-03-01 12:06         ` Eduard Zingerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox