On Fri, Apr 15, 2022 at 09:31:24AM -0400, James Bottomley wrote: > I think the solution to the problem is to try to maintain highly mobile > reference implementations and also keep constantly considering what the > requirements are for mobility (both on the part of the reference > implementation and the kernel). I also think that if we ever gave > impementors the magic ability just to dump any old code in the kernel, > they'd use it to take the lazy way out because it's a lot easier than > trying to keep the reference implementation separate. > > The fact that most "reference" implementations don't conform to the > above isn't something we should be encouraging by supplying > compatibility APIs that paper over the problem and encourage API bloat. I think it might help if we had a - standard set of review guidelines - standard workflow for pulling in (vendoring, however it gets done) code from external repositories. Generally what I see in the community is that people do want to support the kernel better, but then people see things like Greg's response of "don't do that" and it turns people off. Instead, we could - recognize that it's already being done (e.g. with zstd) - put some things in writing about how it _should_ be done This could help a lot with e.g. the way Facebook maintains ZSTD - if we say "look, we want this code factored out better so we only have to review the stuff that's relevant" - the engineers generally won't mind doing that work, and now they'll have something to take to their managers as justification. Another thing I'd like to see is more of what the RCU folks have done - liburcu is _amazing_ in that, at least for me, it's been a drop in replacement for the kernel RCU implementation - and I would imagine it's as much as possible the same code. A good candidate would be the kernel workqueue code: workqueues are _great_ and I don't know of anything like them in userspace. That code should be seeing wider use! And if it was made an external library that was consumed by both the kernel and userspace, it could be - but it would require buy in from kernel people. But as you were saying about Facebook (and I discovered when I was at Google many moons ago, as a young engineer) - large organizations tend to be insular, they like te pretend the outside world doesn't exist. The kernel is one such organization :) We could be a better citizen by encouraging and enabling efforts such as this.