6 ms·
Why is so much code being added to a kernel? <terms of lines of code changed with more than 354 thousand lines of new code added at the end of October when thi
by ToFab123 8y ago
Why is so much code being added to a kernel?
<terms of lines of code changed with more than 354 thousand lines of new code added at the end of October when this merge window opened.
- justapassenger 8y agoDrivers
- azahk 8y agoSomeone once had the great idea that drivers should be in the same codebase as the kernel. Crazy, I know.
- umanwizard 8y agoIt doesn’t seem crazy to me that something that runs in kernel mode and uses kernel APIs should be in the kernel codebase. What are the downsides?
- gizmo686 8y agoThe main downside is that a bad/buggy driver can take down the entire system.
- black-tea 8y agoThat's a problem with the architecture but a reason for having the drivers in the kernel. It means such a case will be handled as a regression and fixed as opposed to the driver just never being available again.
- quotemstr 8y agoWhy should drivers necessarily run in the kernel? With appropriate abstraction for interrupts, DMA, etc. much of the work could be done in userland.
- umanwizard 8y agoThat’s true, but it’s AFAICT a separate question. The question I was responding to was: “accepting that, rightly or wrongly, Linux drivers run in kernel mode, does it make sense for them to be in the source tree?”
- azahk 8y agoLinux would have beaten Windows if it wasn't for that.
- black-tea 8y agoBut at what cost? I don't want to run Linux with non-free drivers. That's not the point.
- azahk 8y agoThat's cool. On the other hand, I would love to have a stable API for drivers so manufacturers can release their drivers. That has been taken from me, and now Linux will never be a real choice for me without good GPU drivers, as an example.