linux: Modify kernel configuration to fix runqlat issue
PATCH v2 1/1 linux: Modify kernel configuration to fix runqlat issue
From: Harish Sadineni <[email protected]>
In Qemu Running "/usr/share/bcc/tools/runqlat 1 5" gives following error:-
libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?
libbpf: failed to find valid kernel BTF
modprobe: FATAL: Module kheaders not found in directory /lib/modules/6.10.14-yocto-standard Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module) or installing the kernel development package for your running kernel version. chdir(/lib/modules/6.10.14-yocto-standard/build): No such file or directory Traceback (most recent call last):
File "/usr/share/bcc/tools/./runqlat", line 293, in <module>
b = BPF(text=bpf_text)
File "/usr/lib/python3.13/site-packages/bcc/__init__.py", line 479, in __init__
raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
the following patch fixes the error.
BCC test summary for x86_64:
Before applying the patch:
TOTAL: 95
PASS: 29
FAIL: 66
After applying the patch:
TOTAL: 95
PASS: 79
FAIL: 16
50 new test cases passed
--- meta/recipes-kernel/linux/linux-yocto_6.10.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-kernel/linux/linux-yocto_6.10.bb +1 -0
@@ -64,6 +64,7 @@ KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc features/nf_tables/nft_test.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc features/gpio/sim.scc", "", d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains("KERNEL_DEBUG", "True", " features/reproducibility/reproducibility.scc features/debug/debug-btf.scc", "", d)}" # libteam ptests from meta-oe needs it KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/net/team/team.scc", "", d)}" # openl2tp tests from meta-networking needs it
Signature · 1 line
2.43.0
Hi Harish,
When you are changing the kernel config or any part of the system that you don't normally work on, it's a good idea to CC the people who work on that part of the system. Doubly so, since this is a v2 and Bruce commented on v1. ;-)
Quoted 3 lines · On 2024-11-20 7:19 a.m., [email protected] wrote:
From: Harish Sadineni<[email protected]>
In Qemu Running "
/usr/share/bcc/tools/runqlat1 5" gives following error:-
Using fewer capitals is usually better:
s/In Qemu Running/In qemu, running:/
Quoted 17 lines
libbpf: kernel BTF is missing at '
/sys/kernel/btf/vmlinux', wasCONFIG_DEBUG_INFO_BTFenabled?
libbpf: failed to find valid kernel BTF
modprobe: FATAL: Module kheaders not found in directory/lib/modules/6.10.14-yocto-standardUnable to find kernel headers. Try rebuilding kernel withCONFIG_IKHEADERS=m(module) or installing the kernel development package for your running kernel version. chdir(/lib/modules/6.10.14-yocto-standard/build): No such file or directory Traceback (most recent call last):
File "/usr/share/bcc/tools/./runqlat", line 293, in <module>
b =BPF(text=bpf_text)
File "/usr/lib/python3.13/site-packages/bcc/__init__.py", line 479, in__init__
raiseException("Failed to compile BPF module %s" % (src_file or "<text>"))the following patch fixes the error.
BCC test summary for
x86_64:
Quoted 8 lines
Before applying the patch:
TOTAL: 95
PASS: 29
FAIL: 66
After applying the patch:
TOTAL: 95
PASS: 79
FAIL: 16
|Better as: State TOTAL PASS FAIL Before 95 29 66 After 95 79 16 |
Quoted 2 lines
50 new test cases passed
s/50 new test cases passed/Note that 50 additional cases pass./
Please explain if the remaining issues are yet to be looked at or if you know something about the failures. Ideally, you'd fix all the ptests or deliberately skip them with a sensible reason in your commit log. I'm not requiring you to do that yet, I just want to understand the current state.
Please explain why you added: features/reproducibility/reproducibility.scc both here and in the v3 commit log. I not sure if we want these features as a defaults for debug kernels but I expect that Bruce or Zhe will comment.
Good work and I look forward having all of the bcc ptests pass.
../Randy
Quoted 18 lines
Signed-off-by Harish Sadineni<[email protected]>--- meta/recipes-kernel/linux/linux-yocto_6.10.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-kernel/linux/linux-yocto_6.10.bb +1
-0@@ -64,6 +64,7 @@ KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc features/nf_tables/nft_test.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc features/gpio/sim.scc", "", d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains("KERNEL_DEBUG", "True", " features/reproducibility/reproducibility.scc features/debug/debug-btf.scc", "", d)}" # libteam ptests from meta-oe needs it KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/net/team/team.scc", "", d)}" # openl2tp tests from meta-networking needs it
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Quoted 9 lines · Randy MacLeod
Hi Harish,
When you are changing the kernel config or any part of the system that you don't normally work on, it's a good idea to CC the people who work on that
part of the system. Doubly so, since this is a v2 and Bruce commented on v1. ;-)
Thanks Randy! I had completely missed this, and didn't even remember my comments on v1. I just had to go back and find them!
Another tip we could add is that on any new version of a patch, summarize the new changes in the throw away section, so us with bad memories can remember what was motivating the v2.
Quoted 48 lines · On 2024-11-20 7:19 a.m., [email protected] wrote:
From: Harish Sadineni <[email protected]> <[email protected]>
In Qemu Running "
/usr/share/bcc/tools/runqlat1 5" gives following error:-Using fewer capitals is usually better:
s/In Qemu Running/In qemu, running:/
libbpf: kernel BTF is missing at '
/sys/kernel/btf/vmlinux', wasCONFIG_DEBUG_INFO_BTFenabled?
libbpf: failed to find valid kernel BTF
modprobe: FATAL: Module kheaders not found in directory/lib/modules/6.10.14-yocto-standardUnable to find kernel headers. Try rebuilding kernel withCONFIG_IKHEADERS=m(module) or installing the kernel development package for your running kernel version. chdir(/lib/modules/6.10.14-yocto-standard/build): No such file or directory Traceback (most recent call last):
File "/usr/share/bcc/tools/./runqlat", line 293, in <module>
b =BPF(text=bpf_text)
File "/usr/lib/python3.13/site-packages/bcc/__init__.py", line 479, in__init__
raiseException("Failed to compile BPF module %s" % (src_file or "<text>"))the following patch fixes the error.
BCC test summary for
x86_64:Before applying the patch:
TOTAL: 95
PASS: 29
FAIL: 66
After applying the patch:
TOTAL: 95
PASS: 79
FAIL: 16Better as:
State TOTAL PASS FAIL
Before 95 29 66 After 95 79 1650 new test cases passed
s/50 new test cases passed/Note that 50 additional cases pass./
Quoted 8 lines
Please explain if the remaining issues are yet to be looked at or if you know something about the failures. Ideally, you'd fix all the ptests or deliberately skip them with a sensible reason in your commit log. I'm not requiring you to do that yet, I just want to understand the current state.
Please explain why you added: features/reproducibility/reproducibility.scc both here and in the v3 commit log.
Agreed on this! If something is being provided by that fragment that the tests need, it might actually be something that the btf fragment should automatically include, or maybe we should be splitting out an option.
I not sure if we want these features as a defaults for debug kernels but I
Quoted 2 lines
expect that Bruce or Zhe will comment.
For debug, it is probably ok. We don't guard against bloat/size nearly as carefully on this. That being said, there definitely is a difference between a debug kernel and "a kernel for running yocto's ptests" and we have to guard against that.
Bruce
Quoted 28 lines
Good work and I look forward having all of the bcc ptests pass.
../Randy
Signed-off-by Harish Sadineni <[email protected]> <[email protected]>--- meta/recipes-kernel/linux/linux-yocto_6.10.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-kernel/linux/linux-yocto_6.10.bb +1
-1@@ -64,6 +64,7 @@ KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc" KERNEL_FEATURES:append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc features/nf_tables/nft_test.scc", "", d)}" KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc features/gpio/sim.scc", "", d)}" +KERNEL_FEATURES:append = " ${@bb.utils.contains("KERNEL_DEBUG", "True", " features/reproducibility/reproducibility.scc features/debug/debug-btf.scc", "", d)}" # libteam ptests from meta-oe needs it KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/net/team/team.scc", "", d)}" # openl2tp tests from meta-networking needs it --# Randy MacLeod
# Wind River Linux
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II