#sched_ext, which allows scheduling policies to be implemented as #BPF programs, has been merged for #Linux 6.12:
https://git.kernel.org/torvalds/c/88264981f2082248e892a706b2c5004650faac54
See https://lwn.net/Articles/922405/ for a description of what it does and https://lwn.net/Articles/972710/ for the controversy it caused that is the reason why it took so long to land in mainline.
I ended up with:
ftrace {
event.kprobes {
tpm_transmit {
filters = "common_pid < 2"
probes = "tpm_transmit"
hist {
keys = stacktrace
}
}
}
}
kernel {
trace_buf_size = 1M
trace_options = sym-addr
}
It gives me counts of stack exercised during the boot. I’d like to get latency calculation but I’m not really good at this so this can do for the time being.
The is held in /sys/kernel/debug/tracing/events/kprobes/tpm_end/hist
.