rakelimit
rakelimit copied to clipboard
replace bpf_ktime_get_ns with faster bpf_jiffies64
The single call to bpf_ktime_get_ns
uses about 30% of benchmark time on my machine. It would be a big perf win if we can replace it with something else.
There is a function bpf_jiffies64
which is probably cheaper, but less accurate. Open questions:
- What is the resolution we can get from jiffies64, and is that enough for our purposes?
- How do we convert jiffies64 to a timestamp?