-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf,datapath: read jiffies from /proc/schedstat #25795
Conversation
The Cilium agent has been throwing the 'Auto-disabling "enable-bpf-clock-probe" feature since kernel doesn't expose /proc/timer_list' warning for a while now. Since /proc/timer_list is not available under the default k8s SecurityContext and Docker also masks the file by default, read it from /proc/schedstat instead. Reuse the existing parsing code from probes.KernelHZ to obtain the value. Signed-off-by: Timo Beckers <timo@isovalent.com>
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should have asked that back when we introduced the probe that relies on /proc/schedstat
: Should we add CONFIG_SCHEDSTATS=y
as a system requirement (for certain features) somewhere? I just realized that it's not set on my kernel and I'm missing /proc/schedstat
.
I think we should document it at https://docs.cilium.io/en/stable/operations/system_requirements/#linux-kernel. |
The Cilium agent has been throwing the 'Auto-disabling "enable-bpf-clock-probe" feature since kernel doesn't expose /proc/timer_list' warning for a while now.
Since /proc/timer_list is not available under the default k8s SecurityContext and Docker also masks the file by default, read it from /proc/schedstat instead.
Reuse the existing parsing code from probes.KernelHZ to obtain the value.
Fixes: #25463
Backporting to 1.13 only since 1.12 doesn't have the new /proc/schedstat reader infra yet.