On 2024-10-07 12:42:04 [+0200], Le Chaudron Nautique wrote: > Hello, Hi, > after a lot of reading, I believe I'm still missing something concerning > "priority" level (or is it my understanding of the kernel ?). See Scheduling policies in sched(7) https://manpages.debian.org/bookworm/manpages/sched.7.en.html#Scheduling_policies … > If it write a kernel module (I used the site of embetronix for that) to > manage the GPIO interrupts and output, what is the "priority" of this module > (since interrupts are priority 50 I assume ? I believe we can't change this > value) As Alison wrote, ps is the tool to check. You can change it with chrt. > If I use cpu isolation / interruts cpu affinity, is that equivalent to > dedicate a cpu to this module ? Or will it still sometimes be "busy" with > other cpus ? taskset can be used to change the CPU affinity of a task. https://manpages.debian.org/bookworm/manpages-dev/sched_setaffinity.2.en.html The isolated CPU is not part of the default CPU affinity mask of a task so you have to set it explicitly. If no task has set affinity to this CPU, the CPU remains idle. You can use something like kernelshark/ trace-cmd to figure out what is running on a certain CPU. > If I am not mistaken, it is not possible to manage affinity between kernel > module and cpu, it is only for the treads or interrupt by masking ? The affinity can not be set for a module. The affinity can be set for tasks/ treads and interrupts. The latter would be https://docs.kernel.org/core-api/irq/irq-affinity.html > Thanks for your help. > > Mathieu Sebastian