Someone should write a library that uses seccomp-bpf to intercept blocking syscalls and route them to a user-mode scheduler on Linux…
-
-
Replying to @pcwalton
I actually tested this with a proof of concept. Trapping with seccomp/SIGSYS adds only ~0.75µs of overhead to every syscall.
2 replies 2 retweets 14 likes -
Replying to @pcwalton
Seems hard to believe. How fast is your box? 750ns does not sound plausible for the round-trips needed.
2 replies 0 retweets 0 likes -
Replying to @RichFelker
2.8 GHz Core i7 MacBook Pro. It was in a VM though… Raw read() on /dev/zero was like 0.18µs and the signal handler added like 0.5µs.
1 reply 0 retweets 1 like -
Replying to @pcwalton
I guess 180ns ≃ 500 cycles is achievable for syscalls without much work to do, and ~3x that might be plausible for round trips.
2 replies 0 retweets 0 likes -
Replying to @RichFelker
To be clear, this is an awful hack, and I don’t love M:N, but IMHO if you’re going to do it you should make it compatible with existing code
1 reply 0 retweets 0 likes -
Replying to @pcwalton
IMO it's more interesting for sandboxing N threads or even processes in one actual thread.
1 reply 0 retweets 1 like -
Replying to @RichFelker
Sure, that’s what seccomp was designed for. My basic problem is “if people really want M:N, what’s the best way to provide it”.
1 reply 0 retweets 0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.