Skip to content

Conversation

ti-mo
Copy link
Contributor

@ti-mo ti-mo commented May 31, 2023

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.

bpf,datapath: read jiffies from /proc/schedstat

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>
@ti-mo ti-mo added kind/bug This is a bug in the Cilium logic. area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/bug This PR fixes an issue in a previous release of Cilium. needs-backport/1.13 labels May 31, 2023
@ti-mo ti-mo requested review from a team as code owners May 31, 2023 13:29
@ti-mo ti-mo requested review from julianwiedmann, rgo3 and meyskens May 31, 2023 13:29
@ti-mo
Copy link
Contributor Author

ti-mo commented May 31, 2023

/test

Copy link
Contributor

@rgo3 rgo3 left a 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.

@ti-mo ti-mo merged commit 8531c5a into cilium:main May 31, 2023
@ti-mo ti-mo deleted the tb/schedstat-jiffies branch May 31, 2023 19:16
@pchaigno
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
Status: Released
Development

Successfully merging this pull request may close these issues.

BPF jiffies never enabled due to missing /proc/timer_list
6 participants