News for hackers. Stuff that matters.
Re:Rust in the 6.2 Kernel by insanitybit on Friday November 18, 2022 @02:34PM (#33660775)
It can absolutely make things faster. If your program is running on data that exists in the kernel you don't need to copy it over to userland/ perform expensive context switching.
Re:Rust in the 6.2 Kernel by tga_d on Friday November 18, 2022 @03:32PM (#33661640)
It can make things faster is not the same as simply running it in the kernel will make it faster. There are definitely certain situations that making use of fewer context switches helps with, and where page mapping isn't sufficient, but if you just write an entire user-space web server, then just compile it as a kernel module, expecting it to see a notable performance improvement, you're going to be disappointed.
Re:Rust in the 6.2 Kernel by insanitybit on Friday November 18, 2022 @03:38PM (#33661744)
Web server sounds like exactly the kind of workload that will benefit from moving to the kernel.
Re:Rust in the 6.2 Kernel by sitkack on Friday November 18, 2022 @08:15PM (#33665558)
Re:Rust in the 6.2 Kernel by insanitybit on Friday November 18, 2022 @08:26PM (#33665660)
Yeah, unikernels try to exploit the benefits as well.
Re:Rust in the 6.2 Kernel by kaba0 on Saturday November 19, 2022 @12:05PM (#33671991)
Would that really give a sizable benefit over, say async IO? Especially an “automatic” one like Java’s Loom?
Re:Rust in the 6.2 Kernel by insanitybit on Saturday November 19, 2022 @03:04PM (#33674052)
Yes, it can still have significant benefits. Async IO is an attempt to get around the performance issues and, given lots of kernel support that largely does not exist today, it can bridge the gap to a degree, but it's never going to match just avoiding the entire issue.