Skip to content
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

Function group heuristics for kernel threads #328

Open
tilsche opened this issue Mar 20, 2024 · 2 comments
Open

Function group heuristics for kernel threads #328

tilsche opened this issue Mar 20, 2024 · 2 comments

Comments

@tilsche
Copy link
Member

tilsche commented Mar 20, 2024

For userspace threads, our naming based on the comm of threads and processes works just well. For kernel threads, it would be very convenient to apply some heuristic, e.g.: for watchdog/<cpuid>, it would be great if it ends up in the same function group. But also things like ptlrpcd_07_15, kiblnd_sd_06_00.

@cvonelm
Copy link
Member

cvonelm commented Mar 20, 2024

According to this Stackoverflow answer, one can check the flags field of /proc/[pid]/stat for the PF_KTHREAD bit to check if it is a kernel thread.

@cvonelm
Copy link
Member

cvonelm commented Aug 15, 2024

I have implemented this in the https://github.com/tud-zih-energy/lo2s/tree/issue-328-group-kernel-threads branch. please check if this matches your expectation. For me it looks fine in Vampir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants