El jue., 12 sept. 2019 a las 6:26, Bharath Vedartham (<linux.bhar@xxxxxxxxx>) escribió: > Just to be clear, What do you mean by current process. Is it the process > which is executing the kernel module? That would be a kernel thread I > believe or do you want to be able to set the cpu affinity for any > process given its PID? > And are you looking at setting CPU affinity of kernel threads or user > threads. Sorry, I wasn't clear: I want to set the affinity of 'current', which is a kernel thread. El jue., 12 sept. 2019 a las 6:38, Piotr Figiel (<figiel@xxxxxxxxx>) escribió: > set_cpus_allowed_ptr() is exported, maybe this is what you're looking for? Yes, that's exactly what I needed. Thanks! I actually ended up using work_on_cpu, which fits my use case better. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies