These folks have been kernel devs for decades. They literally get paid by their employers to work on the kernel. Why shouldn't we expect the most basic professionalism from supposedly elite devs?
And they do work on the kernel. The thing is no employer enforces their coding rules on the Linux kernel project, because the project has its own rules, that mostly work. The lack of documentation may be regarded as sloppiness, but it's a culture in the kernel development process.
I guarantee if I changed kmalloc to add a NUMA node parameter people would lose their mind and reject the patch. The important APIs have too much stuff using them to change frequently.
Being able to ask for a chunk of memory physically close to either another CPU core or another PCIe device is fairly useful if low-latency access to that memory is important for future use. AMD Zen 5 has some absolutely horrible cross-CCD latency penalties, to the point that a ring buffer using non-temporal loads and stores as well as cache line flushing for items in the buffer is lower latency than bouncing the cache line back and forth between cores. source, and if you are unfamiliar with the publication you can take Ian Cutressās endorsement as well as comparing to the anandtech article which has nearly identical cross-core latency numbers.
With hardware doing dumb stuff like this, being able to request that memory be allocated on a page physically close to where it will be used is important. This is more pronounced in multi-socket servers, where putting the TCP buffer on a different socket than the NIC causes lots of headaches.
This is useful for virtual memory allocators as well. Most of my experience is with DPDK, where rte_malloc_socket requires a NUMA node parameter for these reasons. These are virtual memory allocations, but the allocator, which is hugepage backed so thereās a limited number of pages to do lookups for, uses libnuma to sort out which pages belong to which NUMA node and then effectively creates a lookup table of sub-allocators so you can ask for memory on a particular NUMA node, all fully in virtual memory. It makes calls to rte_malloc_socket a bit more expensive, but there were massive latency improvements when used properly.
Documentation is a job function, not professionalism. And documentation has no impact to end users unless someone uses it. Itās a very long-term indirect impact work item, and so itās often one of the first things that gets elided or dropped when people are overworked.
The kernel filesystem api as it stands right now has better documentation than many of the work projects that Iāve been on, FAANG or not.
As such a lack of better documentation may simply be because of his opinion that Rust isnāt useful, the current Rust effort is far from having a concrete impact on end users, and he doesnāt want to spend his time on an effort that he doesnāt believe will succeed. Rather than some kind of Machiavellian ploy.
18
u/TurbulentSkiesClear Aug 31 '24
These folks have been kernel devs for decades. They literally get paid by their employers to work on the kernel. Why shouldn't we expect the most basic professionalism from supposedly elite devs?