sched-ext/scx

__handle_mm_fault can not be (reliably) kprobe'd

Closed this issue · 4 comments

pg83 commented

It is declared as static, https://elixir.bootlin.com/linux/v6.11.4/source/mm/memory.c#L5586, and actually inlined in my kernel build:

pg# cat /proc/kallsyms | grep handle_mm_fault
0000000000000000 T handle_mm_fault # no __handle_mm_fault!

So scx_rustland can not start:

....
libbpf: map '.data.BPFLAND': created successfully, fd=15
libbpf: map 'rustland': created successfully, fd=16
libbpf: prog 'kprobe_handle_mm_fault': failed to create kprobe '__handle_mm_fault+0x0' perf event: No such file or directory
libbpf: prog 'kprobe_handle_mm_fault': failed to auto-attach: -2
Error: Failed to attach non-struct_ops BPF programs

Caused by:
    No such file or directory (os error 2)
pg83 commented

I see that was fixed in HEAD, so I tried build it from https://github.com/sched-ext/scx/archive/fb3f1d0b43d8a1f69cbc434f4a43145dbd983076.zip

It builds, but froze my system after short period of working, without any clue.

pg83 commented

I am on 6.12-rc3, by the way.

With the 6.12 kernel you need this additional kernel patch to run rustland reliably: arighi/sched_ext@3ff4a76

This reverts an old task switching behavior that is required by rustland and it changed in 6.12.

This issue should be fixed by b3c5a23, so I'm closing this for now.