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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 24, 2021 at 1:42 AM Lorenz Bauer <lmb@xxxxxxxxxxxxxx> wrote:
>
> On Sun, 23 May 2021 at 16:58, Alexei Starovoitov
> <alexei.starovoitov@xxxxxxxxx> wrote:
>
> ...
>
> >
> > 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 ?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux