Thread (35 messages) 35 messages, 9 authors, 2021-06-02

Re: [RFC PATCH bpf-next] bpf: Introduce bpf_timer

flat view

From: Alexei Starovoitov <hidden>
Date: 2021-05-24 14:58:52
Also in: bpf

On Mon, May 24, 2021 at 1:42 AM Lorenz Bauer [off-list ref] wrote:
On Sun, 23 May 2021 at 16:58, Alexei Starovoitov
[off-list ref] wrote:

...
quoted
msecs are used to avoid exposing jiffies to bpf prog, since msec_to_jiffies
isn't trivial to do in the bpf prog unlike the kernel.
Isn't that already the case with bpf_jiffies64?
It's reading jiffies. To convert to time the prog needs HZ value.
The HZ is also accessible via kconfig special map type and libbpf magic,
but supplying jiffies as an end-time is an implementation detail.
Are you arguing that api should be exactly one-to-one to kernel
and force all progs to do bpf_jiffies64() + end_time/HZ ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help