For example, the old process has its data in the CPU's fastest on-die cache, the new one doesn't - so it's initially slower. And the same thing can happen when switching back.
For the lowest latency applications, there's also competition from "just dedicate a core to it full time" and "offload it to a dedicated microcontroller" lowering the demand to get it merged.
That's interesting, is there a place to read more about it? E.g. how to set it up on Linux and how much does it help with audio.
Assigning an entire CPU core to audio might be a bit much, unless you've got CPU cores to spare - the context in which I heard of this was high frequency trading, where the server really didn't need to do much except run this one application.
I work in trading, pretty much all of our performance sensitive apps use core isolation.
On windows this sort of comes out of the box because windows always defaults CORE0 to the OS and is mostly single threaded, but you can set CPU affinity on your processes in process: just avoid core0.
https://learn.microsoft.com/en-us/windows/win32/api/winbase/...
I've found a lot of drivers like to spread their interrupts all over the place, so it's not as simple as using cpu affinity (or pinning processes) outside core 0 :(
Check the specs or ask GPT ("on many separate on-die cache does the 12th gen intel Alder Lake P i7 1270 has?") and you'll see it's simpler to think about it as having 3 groups of cores with different features because:
- the 1st group has 4 performance cores each with their own L1 and L2: that's where I put the OS, with core 0 as usual and the other in NO_HZ, and the interrupts on power core 4 (here I'm using 0 and 4 to match what coretype reports P-CORE=0..7 that's due to hyperthreading)
- then the next 2 groups have 4 efficiency cores each, sharing the L2 (The L3 is shared all over, so it doesn't matter)
You could try to use my configuration as a base, and if it's not enough, you could try pinning the audio app on the power cores (obviously not 0 and 4 that are used, but like 1-3 and 5-7, which you could make tick if you prefer, you could also use more than 100 HZ depending on your needs)
It will take you some experimentation, but as a fellow audiophile I'd be curious about the results it'd get you!