Installing cpu affinity for the linux kernel, not the process

I find it difficult to find information on how to install cpu merging for the linux kernel (with all its loaded modules), NOT for a specific process.

This is because I want the kernel to run on CPU 0 all the time to process I / O data, and also not to make any switches to work on the other 3 CPUs, because it can pollute L1 and L2 caches.

Thanks in advance.

Nulik

+7
source share
2 answers

Kernel operation on behalf of processes will always be performed on the processor that makes the request. However, you can control interrupts. Take a look at /proc/interrupts to identify the interrupts you want to move (say everything that matches eth0 ) and set the affinity, echo hex mask to /proc/irq/XXX/smp_affinity .

+7
source

You can disable other kernels using the kernel command line.

Having no kernel running on the kernel implies that nothing else can be on that kernel. There is no kernel scheduler and TLB settings -> code is not executed.

+1
source

All Articles