2 ms·
Piling on with others; it's avoiding the context switching and copying between user and kernel that improves performance. If you can stay in user space, or sta
by toast0 1y ago
Piling on with others; it's avoiding the context switching and copying between user and kernel that improves performance.
If you can stay in user space, or stay in kernel space, that is likely to be better performance than going back and forth.
This is why sendfile is great; rather than storage -> kernel memory -> user memory -> kernel memory -> network, you get storage -> kernel memory -> network. That's two less copies, and fewer context switches.