I see, got it, thank you for that. That's a nice article. There still might be possibility of some user space code/data being evicted from cache through normal eviction policies (LRUs etc) as kernel code/data gets loaded into it but this effect could be more subtle.
Yes, but that depends on the system call being executed. Another possibility is encountering instruction cache misses while executing the syscall itself. These are all possibilities that can make things worse, but are conditional.
What do you think of the cost of cache flushing, cache coherency, cache pollution due to syscalls? Is it greater than CPU drop in optimizations (branch prediction, instruction pipelining etc) ?
In general data/instruction caches are not touched during system calls or task context switching, at least on x86-64 and arm. These architectures have support for address space identifier (ASID) that ensures one process cannot access another process's data. I have a video on this: https://blog.codingconfessions.com/p/linux-context-switches-the-truth
I see, got it, thank you for that. That's a nice article. There still might be possibility of some user space code/data being evicted from cache through normal eviction policies (LRUs etc) as kernel code/data gets loaded into it but this effect could be more subtle.
Yes, but that depends on the system call being executed. Another possibility is encountering instruction cache misses while executing the syscall itself. These are all possibilities that can make things worse, but are conditional.
What do you think of the cost of cache flushing, cache coherency, cache pollution due to syscalls? Is it greater than CPU drop in optimizations (branch prediction, instruction pipelining etc) ?
In general data/instruction caches are not touched during system calls or task context switching, at least on x86-64 and arm. These architectures have support for address space identifier (ASID) that ensures one process cannot access another process's data. I have a video on this: https://blog.codingconfessions.com/p/linux-context-switches-the-truth