1
votes

Is it possible to change a process's CPU affinity with eBPF? I checked all bpf helper functions, no directly related functions. But can use bpf_get_current_task to retrieve the task_struct. Is it possible to change a process's CPU affinity via modifying its task_struct in eBPF?

1

1 Answers

1
votes

No, it is not. The object you get as a pointer from bpf_get_current_task is ready-only. And I don't know of any other way to change the CPU affinity with BPF today.