-
Notifications
You must be signed in to change notification settings - Fork 96
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
Something went wrong with the 'timeout_ms' field in the 'struct sched_ext_ops' structure #151
Comments
Can you try one of the packaged kernels (for arch or ubuntu)? This might be hitting a known limitation in BPF struct_ops which is being addressed. |
I tired v6.7.5-scx1 and v6.8.0-rc4-scx2, which are mentioned in the PKGBUILD of scx-packaging-arch, but still encountered a similar situation as above. I also tired sched_ext-release-v6.6 . It seems things have changed, but I believe it should be an issue with version mismatch. $ ./test/scx_rustland
libbpf: extern (func ksym) 'scx_bpf_dispatch_cancel': not found in kernel or module BTFs
libbpf: failed to load object 'bpf_bpf'
libbpf: failed to load BPF skeleton 'bpf_bpf': -22
Error: Failed to load BPF program
Caused by:
Invalid argument (os error 22) |
Can you please try a packaged kernel and schedulers? Just so that we have a better idea on where the problem is - ie. does a packaged kernel + self-built schedulers work? How about self-built kernel + packaged scheduler? |
Thanks a lot. I am currently testing on my Arch Linux and waiting for the results. |
That's curious tho. It'd be interesting to find out what went wrong. If you still have a copy of the scheduler binaries from the previous unsuccessful installations, can you copy them over to the arch and see whether it works there? |
Yes, although everything workes fine in my Arch Linux with packaged kernel, if I change to my own compiled kernel, the previous error occurs again, so it can be determined that the problem is with my kernel configuration. I was using a kernel configuration optimized for virtualization scenarios, with SCX_WATCHDOG_MAX_TIMEOUT = 30 * HZ,
...
case offsetof(struct sched_ext_ops, timeout_ms):
if (*(u32 *)(udata + moff) > SCX_WATCHDOG_MAX_TIMEOUT)
return -E2BIG;
ops->timeout_ms = *(u32 *)(udata + moff);
return 1; In |
Thanks for tracking that down. That's definitely a bug in sched_ext. Will fix. |
…version ops->timeout_ms wasn't being converted to jiffies before testing against SCX_WATHCDOG_MATX_TIMEOUT which led to spurious verification failures when with lower HZ kernels. Fix it. Link: sched-ext/scx#151
sched-ext/sched_ext#147 should fix it. Thanks for reporting and debugging the issue. Closing. |
…version ops->timeout_ms wasn't being converted to jiffies before testing against SCX_WATHCDOG_MATX_TIMEOUT which led to spurious verification failures when with lower HZ kernels. Fix it. Link: sched-ext/scx#151 (cherry picked from commit 90b8f6e)
…version ops->timeout_ms wasn't being converted to jiffies before testing against SCX_WATHCDOG_MATX_TIMEOUT which led to spurious verification failures when with lower HZ kernels. Fix it. Link: sched-ext/scx#151 (cherry picked from commit 90b8f6e)
I'am interest in sched_ext and try it on debian on qemu, with sched_ext kernel(sched_ext/d93dc).Some schedulers works fine but BPF code that utilizes the
timeout_ms
field generates 'Failed to attach struct_ops' errors. This occurs both on scx_qmap and scx_rustland scheduler, built from scx version0.1.7
,.$ ./scx_qmap scx_qmap.c:88 [scx panic]: Argument list too long Failed to attach struct_op ------ $ ./scx_rustland Error: Failed to attach struct ops Caused by: bpf call "libbpf_rs::map::Map::attach_struct_ops::{{closure}}" returned NULL
schedulers work fine after removing
timeout_ms
fieldSame results on newest sched_ext kernel
Is there any way to solve this problem?
The text was updated successfully, but these errors were encountered: