1
votes

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
An audio app that requires a routine that critical? Why? How?Martin James
User space code enabling/disabling kernel interrupts. Sound like a good recipe for disaster.too honest for this site
It is an test case on how low the latency on a Linux system can get. Since there are still glitches in the playback but no xruns, there must be interrupts in the routine. Why should disabling interupts for one core cause disasters? From what I read in the kernel section about local_irq_save/..disable they are handled by the other cores.RootRaven
IRQs usually simply wake up threads with high priority, did you tried to assign high RT priority to your critical threads.myaut
Yes, they have rt priority. It could still be faster without USB or eth interrupts.RootRaven

1 Answers

0
votes

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?