BPF List
 help / color / mirror / Atom feed
From: Tero Kristo <tero.kristo@linux.intel.com>
To: bpf@vger.kernel.org
Subject: bpf: RFC for platform specific BPF helper addition
Date: Thu, 23 Feb 2023 15:20:24 +0200	[thread overview]
Message-ID: <0838bc96-c8a8-c326-a8f0-80240cf6b31a@linux.intel.com> (raw)

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


             reply	other threads:[~2023-02-23 13:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 13:20 Tero Kristo [this message]
2023-02-23 17:46 ` bpf: RFC for platform specific BPF helper addition 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0838bc96-c8a8-c326-a8f0-80240cf6b31a@linux.intel.com \
    --to=tero.kristo@linux.intel.com \
    --cc=bpf@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox