-
Notifications
You must be signed in to change notification settings - Fork 38
Description
fossilize-replay is used by Steam to generate games' pre-caching shaders, and it uses all cores and is very CPU-consuming (and makes desktop very slow). system76-scheduler is supposed to limit its nice and IO to lowest. However, it could be found that fossilize-replay is niced as 14 (its default maybe?) instead of 19 when starting games from Steam.
After some debugging with strace, it seems that (unfortunately) steam is running under 32-bit mode, and execsnoop could not capture 32-bit apps' execve() without code modification. In execve_fnname = b.get_syscall_fnname("execve"), execsnoop by default gets __x64_sys_ as its prefix, and __ia32_compat_sys_ is not covered.
It seems that it could be a lot of trouble to make bcc upstream to cover all arch's symbols upstream (they have a lot of tools scripts), so maybe it is necessary to fork execsnoop inside system76-scheduler and make some modifications?
MRE:
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main() {
if (execlp("vim", "vim", (char*) NULL) == -1) {
perror("Failed to start vim");
exit(EXIT_FAILURE);
}
return 0; // Unreachable, execlp replaces the process image if successful
}Compiled by: gcc -m32 ./example.c -o example and run -- execsnoop could not catch this.
If modified with execve_fnname = "__ia32_compat_sys_execve", then it could get this exec. (Haven't tested with Steam's fossilize-replay though)