Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runqlen/cpuunclaimed: Fix runnable_weight issue after Linux 5.7
runqlen / cpuunclaimed add check_runnable_weight_field() as workaround to check runnable_weight presents in struct cfs_rq in kernel/sched/sched.h by trying to access runnable_weight field of struct sched_entity in include/linux/sched.h. Please check more details in PR iovisor#1510 and iovisor#2164. Unfortunately, the runnable_weight field of struct cfs_rq is removed, but the runnable_weight field of struct sched_entity is remained by following patchset series from Linux version 5.7.0. - https://yhbt.net/lore/all/[email protected]/ - https://yhbt.net/lore/all/[email protected]/ Please also check the source of Linux below. - include/linux/sched.h - https://elixir.bootlin.com/linux/v5.7/source/include/linux/sched.h#L475 - kernel/sched/sched.h - https://elixir.bootlin.com/linux/v5.7/source/kernel/sched/sched.h#L502 This PR checks runnable_weight field exists by using kernel_struct_has_field() if target system with BTF enabled, otherwise fallback to legacy on-the-fly compiling check. In the meantime, add Linux version 5.7.0 check in structure definition cfs_rq_partial to prevent issue if target system w/o BTF enabled and Linux version > 5.7. Please check more details in iovisor#4602. Signed-off-by: Ism Hong <[email protected]>
- Loading branch information