Limiting Kernel threads to specific core

227 Views Asked by At

I have a device with two cores core0 and core1. By default, both cores are utilized by Linux kernel to execute the kernel threads. I want to limit all kernel threads to core0 so that my application can run in another core without any interruption which can reduce the execution time of my application as per my understanding. Please let me know if I can achieve this. (I know that by doing this, I'm restricting the freedom of kernel to manage the cpu in a better way. But I'm just curious to see the behaviour.)

1

There are 1 best solutions below

0
Chen Li On

I want to limit all kernel threads to core0 so that my application can run in another core without any interruption which can reduce the execution time of my application as per my understanding.

There is no method to accomplish this task. The only option available is to use the kthread_bind family API to bind your kthreads, but it is not possible to restrict all kthreads.