From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: Vadim Fedorenko <vadfed@meta.com>, Borislav Petkov <bp@alien8.de>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Yonghong Song <yonghong.song@linux.dev>,
Mykola Lysenko <mykolal@fb.com>,
x86@kernel.org, bpf@vger.kernel.org,
Martin KaFai Lau <martin.lau@linux.dev>
Subject: Re: [PATCH bpf-next v8 1/4] bpf: add bpf_get_cpu_time_counter kfunc
Date: Thu, 21 Nov 2024 15:55:46 -0800 [thread overview]
Message-ID: <14f3d0a2-04bd-4843-8ac3-51e4ca65bae2@linux.dev> (raw)
In-Reply-To: <CAEf4BzZtph98_qR1CFpj5Fh_wVg=XaZQ75G44dS-oigLExUHSw@mail.gmail.com>
On 21/11/2024 15:51, Andrii Nakryiko wrote:
> On Thu, Nov 21, 2024 at 7:33 AM Peter Zijlstra <peterz@infradead.org> wrote:
>>
>> On Thu, Nov 21, 2024 at 06:35:39AM -0800, Vadim Fedorenko wrote:
>>> On 21/11/2024 03:32, Peter Zijlstra wrote:
>>>> On Wed, Nov 20, 2024 at 04:08:11PM -0800, Vadim Fedorenko wrote:
>>>>> New kfunc to return ARCH-specific timecounter. For x86 BPF JIT converts
>>>>> it into rdtsc ordered call. Other architectures will get JIT
>>>>> implementation too if supported. The fallback is to
>>>>> __arch_get_hw_counter().
>>>>
>>>> Still not a single word as to *WHY* and what you're going to do with
>>>> those values.
>>>>
>>>> NAK
>>>
>>> Did you have a chance to read cover letter?
>>
>> Cover letter is disposable and not retained when applying patches, as
>> such I rarely read it.
>
> It's not disposable for BPF trees. We preserve them as part of the
> merge commit for the patch set, e.g. [0]. Both bpf and netdev
> maintainers use a set of scripts to apply patches (pw-apply,
> specifically), that does all that automatically.
Yeah, was going to write the same...
> Vadim,
>
> Please do another careful pass over commit messages and cover letter.
> I'd suggest moving the version history into cover letter (see other
> multi-version cover letter for an example). You can use an example
> from your BPF selftests as an intended use case (measuring the
> duration of some BPF piece of logic), and I'd also mention that this
> is useful to measure the duration of two related BPF events. E.g.,
> uprobe entry and exit, of kprobe entry/exit. kprobe.session and
> uprobe.session programs are especially well suited for that, as they
> allow to capture initial timestamp, store it in session cookie, then
> retrieve it in return probe and calculate the difference.
Sure, I'm on it already.
>
> Please also update all the "cycles" references to "time counter",
> stuff like that.
Yeah, I've done it already in my local branch.
Thanks.
>
> pw-bot: cr
>
>
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?h=bpf-next-6.13&id=379d5ee624eda6a897d9e1f7f88c68ea482bd5fa
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/pw.git/
next prev parent reply other threads:[~2024-11-21 23:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 0:08 [PATCH bpf-next v8 0/4] bpf: add cpu cycles kfuncss Vadim Fedorenko
2024-11-21 0:08 ` [PATCH bpf-next v8 1/4] bpf: add bpf_get_cpu_time_counter kfunc Vadim Fedorenko
2024-11-21 11:32 ` Peter Zijlstra
2024-11-21 14:35 ` Vadim Fedorenko
2024-11-21 15:33 ` Peter Zijlstra
2024-11-21 23:51 ` Andrii Nakryiko
2024-11-21 23:55 ` Vadim Fedorenko [this message]
2024-11-21 0:08 ` [PATCH bpf-next v8 2/4] bpf: add bpf_cpu_time_counter_to_ns helper Vadim Fedorenko
2024-11-21 11:31 ` Peter Zijlstra
2024-11-21 0:08 ` [PATCH bpf-next v8 3/4] selftests/bpf: add selftest to check rdtsc jit Vadim Fedorenko
2024-11-21 0:08 ` [PATCH bpf-next v8 4/4] selftests/bpf: add usage example for cpu cycles kfuncs Vadim Fedorenko
2024-11-22 11:34 ` [PATCH bpf-next v8 0/4] bpf: add cpu cycles kfuncss Peter Zijlstra
2024-11-22 15:40 ` Vadim Fedorenko
2024-11-26 18:12 ` Andrii Nakryiko
2024-11-28 11:27 ` Peter Zijlstra
2024-11-28 11:33 ` Peter Zijlstra
2024-11-28 14:30 ` Vadim Fedorenko
2024-11-28 14:28 ` Vadim Fedorenko
2024-12-02 19:15 ` Andrii Nakryiko
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=14f3d0a2-04bd-4843-8ac3-51e4ca65bae2@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vadfed@meta.com \
--cc=x86@kernel.org \
--cc=yonghong.song@linux.dev \
/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