logoalt Hacker News

vlovich123yesterday at 3:10 PM1 replyview on HN

Small correction on ambiguous wording - syscalls do not evict all your stuff from CPU caches. It just has to page in whatever is needed for kernel code/data accessed by the call, but that’s no different from if it was done in process as a normal function call.


Replies

Polizeiposauneyesterday at 6:25 PM

Depending on implementation details of your CPU and OS, the syscall path may need to flush various auxillary caches (like one or more TLBs) to prevent speculation attacks, which may put additional "drag" on your program after syscall return.

show 1 reply