News for hackers. Stuff that matters.
Re:Thread-per-core by kldx on Friday October 06, 2023 @10:51AM (#37791563)
That's an interesting view and one I agree with. Surely if context switch = expensive is common knowledge for a long time in computing, the kernel people and CPU companies would have tried optimizing it to the fullest, no?
Re:Thread-per-core by insanitybit on Friday October 06, 2023 @10:54AM (#37791596)
Syscalls have gotten quite a lot slower after Specter/Meltdown mitigations. Though I suspect that if you're writing a web service that wants TPC you should just disable these - I've told that to Scylla Cloud before, they have no reason to keep them enabled and plenty of reasons to disable them.

The other thing is 'io_uring', which is trying to come at the problem by removing context switching altogether by providing a cheap primitive for communicating with the kernel.

Re:Thread-per-core by kldx on Saturday October 07, 2023 @01:32PM (#37803684)
Sadly io_uring has its share of vulnerabilities as well
Re:Thread-per-core by insanitybit on Saturday October 07, 2023 @03:22PM (#37804676)
Of course, I'm very aware of that fact. But it is designed to minimize system calls exactly because they can add significant overhead.