How to call make kernel module calls or disable interrupts?

888 views Asked by At

I have a low latency server/client audio application running on seperate cores. (via cpuset) No xruns are detected, I suspect the scheduler to interrupt my critical routine. Since disabling interrupts is not possible in user space my idea was to create a kernel module and write wrapper functions for local_irq_disable()/local_irq_enable(). Security is not an issue. An rt Linux with fully preemptible kernel is in use.

  1. I assume the nanosleep function won't work without interrupts too?
  2. What would be the more elegant way to disable the scheduler but keep the timers running?
  3. How do I call these wrapper functions from user space?

Edit: SMP affinity is the keyword here: SMP IRQ Affinity

1

There are 1 answers

2
Jan On

I would recommend to first try to trace your kernels scheduling by using lttng and tracecompass to find out what really is happening on your system and what other process, ressource lock or interrupt is forcing your process out of cpu.

Do you really need this process to run without cpu time gaps? If not: do you need response time in micoroseconds or milliseconds?