linux-stable/include
Dmitrii Banshchikov d055126180 bpf: Add bpf_ktime_get_coarse_ns helper
The helper uses CLOCK_MONOTONIC_COARSE source of time that is less
accurate but more performant.

We have a BPF CGROUP_SKB firewall that supports event logging through
bpf_perf_event_output(). Each event has a timestamp and currently we use
bpf_ktime_get_ns() for it. Use of bpf_ktime_get_coarse_ns() saves ~15-20
ns in time required for event logging.

bpf_ktime_get_ns():
EgressLogByRemoteEndpoint                              113.82ns    8.79M

bpf_ktime_get_coarse_ns():
EgressLogByRemoteEndpoint                               95.40ns   10.48M

Signed-off-by: Dmitrii Banshchikov <me@ubique.spb.ru>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20201117184549.257280-1-me@ubique.spb.ru
2020-11-18 23:25:32 +01:00
..
acpi pci-v5.10-changes 2020-10-22 12:41:00 -07:00
asm-generic asm-generic: fixes for v5.10 2020-10-30 13:11:46 -07:00
clocksource
crypto
drm drm: drm_print.h: fix kernel-doc markups 2020-10-27 11:21:39 +01:00
dt-bindings ARM: Devicetree updates 2020-10-24 10:44:18 -07:00
keys
kunit kunit: test: fix remaining kernel-doc warnings 2020-10-26 13:23:44 -06:00
kvm ARM: 2020-10-23 11:17:56 -07:00
linux bpf: Add bpf_ktime_get_coarse_ns helper 2020-11-18 23:25:32 +01:00
math-emu
media ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
memory
misc
net xsk: Introduce batched Tx descriptor interfaces 2020-11-17 22:07:40 +01:00
pcmcia
ras
rdma RDMA: Add rdma_connect_locked() 2020-10-28 09:14:49 -03:00
scsi SCSI misc on 20201023 2020-10-23 16:19:02 -07:00
soc soc/fsl/qbman: Add an argument to signal if NAPI processing is required. 2020-11-03 17:41:03 -08:00
sound ALSA: make snd_kcontrol_new name a normal string 2020-10-26 20:28:59 +01:00
target
trace This is mainly server-to-server copy and fallout from Chuck's 5.10 rpc 2020-11-09 12:43:12 -08:00
uapi bpf: Add bpf_ktime_get_coarse_ns helper 2020-11-18 23:25:32 +01:00
vdso
video gpu: ipu-v3: remove unused functions 2020-10-26 10:42:38 +01:00
xen xen: branch for v5.10-rc1c 2020-10-25 10:55:35 -07:00