I need to make the process to run in real time as much as possible.
All the communication is done via shared memory – memory mapped files – no system calls at all – it uses busy waiting on shared memory.
The process runs under real time priority and all memory is locked with mlockall(MCL_CURRENT|MCL_FUTURE) which succeeds and process has enough ulimits
to have all the memory locked.
When I run it on it perf stat -p PID I still get counts of minor page faults.
I tested this with both process affinity and without.
Question:
Is it possible to eliminate them at all – even minor page faults?
I solved this problem by switching from memory mapped files to POSIX shared memory
shm_open+ memory locking.