I'll explain my Digital Audio Workstation system using a Pi4 first, then the problem.
I run normal Linux on first two cores which handles WiFi, USB (MIDI in and out), HDMI, etc
I use isolcpu to isolate the other two cores and this works fine.
The third core takes control inputs from the second core via shared memory and calculates all the audio parameters in real time
The fourth core takes inputs from the third core via shared memory and does the actual multiple signal generation, multiplies by the levels, adds them all up, then sends out on the I2S port. Currently all cores run standard C++ programa loaded up under Linux and I haven't noticed any audio glitches on the fourth core, but may want to move the fourth core to bare metal later if it gives a little more performance.
The fourth core produces samples at 96kHz - say 10 uS
The third core produces coefficients at 6kHz - say 160 uS
The second core produces control signals at 500 Hz - 2mS
The first core mostly updates the display, etc so 50 Hz/20 mS is good enough
This all sort of works, but to do so I have so far disabled the caches on all cores so the fourth core in particular isn't running anywhere near as fast as it could do. If caches are enabled it doesn't see the updates from the third core at all.
So my question is, is there a way of enabling caching, but having the third core force a cache refresh on core 4 ?
Or is there a high speed mailbox between the cores that the fourth core can read and know to force its own cache refresh ?
The shared memories are about 64k and change often so I don't want to actually copy data through a virtual link or anything - it needs to be shared memory.
Hope this make sense