I want to run a small piece of code on Linux running on a iMX6 dual core system, which toggles some GPIOS every 1ms, with as little jitter as possible. There may be other low priority tasks running on the system.
So I gather I have these options available:
- CPU shielding: Make my task to use the whole cpu 1, while leaving cpu 0 for everything else. Wasting cpu 1 time is not a problem in my case.
- Re-compiling the kernel with PREEMPT_RT, and adjust my task priority to guarantee it will wake up every ms.
So some questions in my head...:
1- What are the pros and cons of each case?
2- In the CPU shielding case, would I build a normal user-space program? Or should I write a module with a kthread?
3- CPU shielding case again: What is the status of cpusets vs isolcpus kernel option? That is, for kernels > 4.x, which way is the most effective?