3 ms·
> What does "upstreamable" mean in this context? Is this good or bad? "Upstream" is the kernel source tree maintained by Linus (and friends). As Linux is open
by Tuna-Fish 4y ago
> What does "upstreamable" mean in this context? Is this good or bad?
"Upstream" is the kernel source tree maintained by Linus (and friends). As Linux is open source, anyone can fork it for any reason, and a lot of people do. However, Linus still maintains the common base that people use to build on top of. "Upstreaming" is the process of getting your code included in these official releases. It's significant because there are no stable interfaces inside the kernel. That is, in any release the Linux developers can change any internal system of the kernel in any way they please, with the only caveat that to get that change included they have to fix up any breakage it causes, but only inside upstream. Or, if you are building your own kernels with your own patch sets, any release of the kernel can completely break your build.
Because of this, if you want your code to be actually used by real people, upstreaming it is considered extremely good, to the point of being almost a necessity. However, it can be a significant hurdle to overcome. Partly because there are fairly strict code quality/style requirements (as any kernel dev is supposed to be able to jump into your code to fix issues they caused by modifications elsewhere), but mostly because unlike inside the kernel itself, all interfaces between kernel and userspace are stable. That is, if you start supporting some operation from userspace, you need to be able to support it in perpetuity. Also, the kernel devs are extremely reluctant to add any kind of interface to the kernel where the only thing that uses it is some specific non-free binary blob on the userspace side.
Currently the main reason the code is not upstreamable as is is that it needs a very substantial userspace program to function, which currently only exists as nonfree, and nVidia doesn't think that the interface used to connect to it is well-enough decided they want to freeze it.
So the main hurdle for upstreaming is developing that interface until they are happy with it, and then develop some free version of the userspace portion of their graphics stack that can plug into that same interface.
- MuffinFlavored 4y ago> upstreaming it is considered extremely good are we assuming some sort of automatic testing will be added? unit testing? integration testing? sounds super hard to do for a driver. but... high quality code just being merged into master can still have bugs introduced in the future on accident, right? it's tests that usually makes it safe?
- rsaxvc 4y agoYou can run these sorts of tests in a VM with PCIe passthrough.
- djbusby 4y agoAnd hardware companies usually have large test-beds of hardware. So, Nvidia should be able to build a comprehensive test-suite.
- MuffinFlavored 4y agothe same way they should have been able to build an upstreamable opensource driver all this time, right? lol
- djbusby 4y agoNo. Cause one (hardware) is old-hat and the other (FOSS) is big and risky and scary.
- loganberries 4y agoThe kernel has bugs, all software has bugs. But there are massive massive test suites run by hundreds of companies on linux-next. If you email off a stack of patches that breaks something, chances are you'll get emails back telling you which patch had the breaking change in.
- jsjohnst 4y agoThe reason upstreaming it is considered extremely good really doesn’t have to do with unit testing or really exactly with testing at all. The issue, as stated eloquently by the parent of your post, is that without it being upstreamed, it’s Nvidia’s problem to fix any issues caused by one of their dependencies in the kernel changing, where as if it’s upstreamed, it’s only maybe partially their responsibility (main burden is on whoever changed the dependency).
- taftster 4y agoExcellent answer, thank you. I appreciate both the overall general answer and the detail specifically involving the nvidia driver itself.