A pair of memory-allocation improvements in Linux 5.13
lwn.net
lwn.net
In 2015 high-speed networking was targeting 10G line rate, i.e. 14.8Mpps. Today the NICs are 100G (42Mpps), next year it will be 400G.
I'm not sure how the kernel is expected to follow with the pace. Those NICs will offer offloads, so static network functions should be accelerated without involving the CPU. Still, it seems software-based networking will never be able to catch up.
DPDK and userland solutions in general are able to scale better. At least for DPDK, depending on the workload an L2 forwarding function can do 14.8 Mpps on a single core, and supposed to scale linearly (so 4 cores for a 100G L2 fwd?).
However I've yet to see a TCP implementation able to scale linearly. DPDK in used generally for middleboxes, not endpoints, where scaling TCP has different challenges (handling a socket state with a single RSS dispatch vs. two RSS dispatch I guess).
So what does it say about the future of SDN? Will it be able to keep pace with hardware network functions? A pure kernel-based approach would be nice but it seems impossible. On userland side the industry is not there yet in open-source, as far as I know. There are probably proprietary stacks able to do this, but I don't know them.
In contrast, a new userspace stack doesn't need to worry about backwards compatibility or supporting every use case.
So yes, the kernel can do just as good, but it's harder.
Unfortunately the popular languages are all about single element at a time, and pointer chasing with the compiler having a hard time vectorizing operations and reorganizing data structures. I think most compilers don't/can't even do this because there are not enough guarantees. The only systems that actually do this are DBMSs.
Reminds me of a recent blog post on exactly this topic. Apparently the Jai language might make some progress on this point.
• https://blog.royalsloth.eu/posts/the-compiler-will-optimize-...
• Discussion: https://news.ycombinator.com/item?id=27010965
What does the improvement described in the “Batch page allocation” section add that a custom allocator would be unable to? Or is it a widely-used pattern that many custom allocators can take advantage of? In that case, why put it in the kernel?
Etc.
Is the kernel then the primary place this is used now? Which places in the kernel need and take advantage of it?
There are probably other places where this will help. Now that the interface is available, developers can start trying it.