]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bpf: Add support for absolute value BPF timers
authorTero Kristo <tero.kristo@linux.intel.com>
Thu, 2 Mar 2023 11:46:13 +0000 (13:46 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 3 Mar 2023 06:41:32 +0000 (22:41 -0800)
commitf71f8530494bb5ab43d3369ef0ce8373eb1ee077
treede62a9ddb2781c29925cda8028ef1fb17573dbc5
parentec97a76f113ee0d8fd17178b4e4ffbf0ab9e5452
bpf: Add support for absolute value BPF timers

Add a new flag BPF_F_TIMER_ABS that can be passed to bpf_timer_start()
to start an absolute value timer instead of the default relative value.
This makes the timer expire at an exact point in time, instead of a time
with latencies induced by both the BPF and timer subsystems.

Suggested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Link: https://lore.kernel.org/r/20230302114614.2985072-2-tero.kristo@linux.intel.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/bpf.h
kernel/bpf/helpers.c
tools/include/uapi/linux/bpf.h