LWN.net Logo

Quote of the week

Quote of the week

Posted Dec 16, 2004 16:40 UTC (Thu) by elanthis (subscriber, #6227)
In reply to: Quote of the week by gregkh
Parent article: Quote of the week

And you have completely ignored my point.

Getting drivers in-tree *does not solve anything* for the users, because they are *still* forced to upgrade kernels to get new/fixed drivers.

Do kernel APIs change? Yes. Do they improve with changes? Yes. Your arguments however fall apart.

There is nothign wrong with keeping old interfaces around. You only need to keep them for the release series. Any module compiled against 2.6.0 should work on 2.6.20. If you want to break stuff, say it for 2.7. Is it really that hard? Other Open Source projects the size of the kernel or large manage it easily enough.

The kernel developers probably don't even see the problem. I wouldn't expect you to. Try installing the latest stable version of an enterprise Linux distro (RHEL, for example) and try getting some piece of hardware to work on it for which there was no driver at the distro's time of release. How do you get that hardware to work? Are you going to install a bleeding-edge, untested, unstable development kernel on your machine? Are the other bazillions changes in the kernel really necessary to get a single piece of hardware working? What about an install disc that needs, say, a disk controller driver. How do you get that driver for the disc? With the Linux model, you're screwed, you can't install the OS, you have to wait for a new version of the OS to be released potentially many, many months later in order to install it on your newish hardware.

Getting the driver in-tree doesn't help that.

I really don't care that much about kernel ABI. I'm 100% fine with you guys explicitly stating that *all* modules must be GPL compatible, with no exceptions. I don't care about binary-only modules. I'm just sick of perfectly GPL drivers requiring me to have developer knowledge to get working because I can't just install the driver on my already installed and stable machine that happens to have a new hardware upgrade. It's insane.

You don't have to stop evolving API. You just have to suck it up and keep the old API around until the next major release. Save the really big changes for development series. That's it.


(Log in to post comments)

Quote of the week

Posted Dec 16, 2004 19:26 UTC (Thu) by gregkh (subscriber, #8) [Link]

Sorry, but no, we do not keep old, broken, unsecure apis around. If they are broken, we fix them. If they are unsecure, we fix them. Both of these reasons are why we do not, and will not, have a stable in-kernel api.

And as for "why not just do this for drivers?" Remember that drivers are first-class kernel citizens. There is no difference to the kernel from a USB driver, or a filesystem from the point of view of the code.

And if you want to upgrade your enterprise release kernel's drivers, then talk to your enterprise distro about this. You are staying with a specific kernel version for some reason, and that has nothing to do with the way the kernel developers work.

And if you want to upgrade your wireless card's driver version, then talk to those developers about providing support for older kernel versions. I'm sure if you want to pay them, they would be glad to offer this kind of support :)

Quote of the week

Posted Dec 16, 2004 20:35 UTC (Thu) by mrshiny (subscriber, #4266) [Link]

I guess what you're saying is that the way kernel developers work is not the way users use the kernel.

Don't get me wrong, I think you and the rest of the Linux kernel team have done lots of great work. But, especially since there doesn't seem to be a stable kernel anymore, I feel that needs of the users are being forgotten. The users are staying with particular kernel versions because the kernel is a tool that gets a job done, and replacing the whole kernel to upgrade a single driver is a bad idea from a risk management perspective. Business users don't want variability, they want predictability. In the case of a kernel, if the kernel has a buggy api, so be it, if the kernel is getting the job done. Users don't care about API, or deadlocks. And a deadlock that occurs for other users but doesn't occur for me is irrelevant to my business.

As a kernel developer, you want to eliminate deadlocks and other bugs. But if a bug is not manifesting itself to all users, eliminating that bug at the cost of every user's drivers is a high price to pay. By increasing the functionality of the kernel for some users, who experienced a flaw, you reduce the functionality for other users (binary module users), who can no longer use their hardware, and you make life more difficult for the third class of users who want to use new hardware on an old kernel, but can't because the drivers need to be back-ported. You have to admit: in many cases it is possible to maintain backwards compatibility (at least on a source level) without jumping through hoops, even if an API is broken, or easy to mis-use.

Stable releases

Posted Dec 17, 2004 2:17 UTC (Fri) by mbp (guest, #2737) [Link]

There is a stable release: 2.6.8.1 works great for me. (ymmv) I'm going to stick with it until I need a new driver, or I get bored. The same strategy can work for you: find something that works, then quit fiddling. If you want stability, stop upgrading.

Having a stable release series is not meaningful when the user community is as diverse as for the kernel: what works well for you may be inadequate for someone else. Maybe you need support for new hardware, but to me that's just dangerous churn. Who gets to decide what is critical enough to go into the stable stream?

Stable releases

Posted Dec 17, 2004 13:03 UTC (Fri) by mrshiny (subscriber, #4266) [Link]

This is why the kernel needs a stable release, and drivers need to be
released separately. If the kernel itself is working for you, you don't
upgrade it. But if your drivers are inappropriate, you get new ones, and
install them on your older kernel. Unfortunately we can't do that in the
linux world because the kernel developers have decided (rightly or
wrongly) that they don't want to support that use-case. Why should I
need to upgrade my whole kernel to get a network card working? What if
that network card is newer than my kernel, and the driver only exists on
a newer kernel that doesn't have the same driver api? I am out of luck;
even though my kernel works fine, I want to upgrade a single component in
my whole computer but I now have to upgrade the whole kernel, and ALL the
device drivers. What if a device driver I used to use is now broken?
It's happened in the past.

Stable releases

Posted Dec 17, 2004 20:11 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

This is why the kernel needs a stable release,

Exactly. However, some of the discussion here seems to suggest that Greg and his peers should provide it. There's simply no reason to expect that.

Instead, we need distributors, whom we pay to give us what we need, to provide a stable release. They can take high-reward low-risk changes from kernel.org and add those, and they can skip compatibility-busting changes (or, more likely, make the minor modification required to make the change backward compatible).

Since distributors used to get a lot more free help with that from kernel.org (via the e.g. 2.4 "stable" series) than they do now, I'm still waiting to see if they step up to that responsibility with 2.6-based kernels.

Quote of the week

Posted Dec 20, 2004 17:30 UTC (Mon) by mwilck (guest, #1966) [Link]

You are ignoring the fact that a lot of important drivers, even if GPL, are developed out-of-tree, mostly by hardware manufacturers. This holds even for the venerable aic7xxx/aic79xx which used to be tied into the kernel very closely, but isn't anymore now.

These companies develop their driver code independently, and try to merge them into the mainline kernel once in a while. Usually they try to support a large range of kernel versions with their driver, both vanilla and vendor kernels. These codes quickly evolve into a nightmare of #ifdef's and #if LINUX_VERSION_CODE <= KERNEL_VERSION(...) constructs.

However, what else should a driver developer do? Hardware suppliers can hardly demand from their customers to always stick with the latest -mm kernel. They can't rely on RedHat or Novell to back-port the drivers for them, either, because RedHat and Novell have their own agendas.

IMO the very least kernel developers should do is make the different API versions cleanly discernible by CPP macros. That doesn't mean the old API has to remain in place, there must just be some CPP macro that the driver code can test that says the API has changed. E.g. if a field "foo" is added to "struct bar" then the respective patch should contain a line

#define __STRUCT_FOO_HAS_BAR 1

(or similar, you get it).

I know CPP is ugly, but this is the only safe way for external driver-suppliers to follow development without breaking things completely for older or vendor kernels.

I predict that sooner or later someone will have to come up with some sort of "kernel autoconf" tool only to be able to maintain a minimum level of source-code compatibility between the kernel core and drivers. That'll be a pretty sad day.

I am 100% for GPL drivers and 100% for improving the kernel at max speed. But to gloat about breaking the interface for external suppliers goes too far, and shows a lot of ignorance for the needs of everyone except the core developers.

Quote of the week

Posted Dec 17, 2004 2:02 UTC (Fri) by mbp (guest, #2737) [Link]

You complain to RedHat and/or the hardware vendor, and get them to release a new kernel package which supports the right driver. Installing random drivers yourself would void your expensive RedHat support contract and your even more expensive binary application certification. RedHat support new hardware in updates, sometimes by backporting to a previous kernel.

Leaving aside the RedHat model, you seem to be saying you would like to be able to use a driver released with (say) 2.6.10 without upgrading from 2.6.4. *Even if* Linux had backward-compatible driver interfaces (and I believe Greg when he says they're a bad idea), this wouldn't work. The new driver might depend on new features which don't exist in 2.6.4. The only fix for this is a manual backport, which could be done either by a distribution or by the driver maintainer.

What you want would require not only back- but forward-compatibility: in other words, all internal kernel interfaces must be frozen for the duration of a branch. That's an entirely different development model to what the kernel uses now, and it probably wouldn't scale up.

As Greg and others have offered: if *you* want to do a stable fork of the kernel at any point and backport only the changes you think worthwhile, feel free.

Quote of the week

Posted Dec 17, 2004 13:07 UTC (Fri) by mrshiny (subscriber, #4266) [Link]

You're right, a driver written for 2.6.10 might not work on 2.6.4. But
the thing about a stable API is that people could write drivers for 2.6.0
and it would work on 2.6.10; that's what would happen in practice if
vendors were trying to support a large number of linux users. Driver
writers could make the choice about what they want to support, based on
their users's needs, and write to that API. They could pick a version,
and know that from that version on, the driver will work, until 2.8 comes
out. With the current model, a driver written for 2.6.x may not work for
2.6.x-1 or 2.6.x+1.

Quote of the week

Posted Dec 20, 2004 6:09 UTC (Mon) by rickmoen (subscriber, #6943) [Link]

elanthis wrote:

There is nothing wrong with keeping old interfaces around.[...]

Despite purporting to reply to it, I notice you show no signs of having read Greg's essay, to which you were directed -- which is unfortunate, as it details precisely what's wrong with doing so, and why, accordingly, the kernel maintainers deliberately avoid doing so.

I really strongly recommend that you get around to reading Greg's essay, which has the advantage of both commendably lucid writing and of speaking authoritatively.

Rick Moen
rick@linuxmafia.com

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds