Not logged in
Log in now
Create an account
Subscribe to LWN
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
LWN.net Weekly Edition for June 6, 2013
-- Greg Kroah-Hartman
Quote of the week
Posted Dec 16, 2004 4:28 UTC (Thu) by elanthis (guest, #6227)
"Nothing like driving users crazy because the only way to get their hardware to work is manually download, patch, build, and install a new kernel, since drivers can only really exist in-tree, and that makes it impossible to get new/updated drivers on existing, stable kernels in running systems without deep Linux-guru knowledge that users shouldn't be required to have."
Posted Dec 16, 2004 4:58 UTC (Thu) by mrshiny (subscriber, #4266)
Posted Dec 16, 2004 14:37 UTC (Thu) by Duncan (guest, #6647)
Posted Dec 16, 2004 15:09 UTC (Thu) by mrshiny (subscriber, #4266)
For example, take video cards. You mentioned that you use an older model of video card because it's the last well-supported ATI card. Using an older card won't help you play Doom3; you need a newer card that has better features. Your choices are: buy ATI or nVidia, or don't play Doom3. The applications (or games) drive the computer, not political ideology. A computer doesn't exist in a vacuum.
Anyway, your comment about the relationship between ATI and XFree86 seems to prove my point: commercial companies won't support Linux/Free software if they have to keep working around the games and politics of the developers.
Posted Dec 16, 2004 15:37 UTC (Thu) by wookey (subscriber, #5501)
We design hardware and one of the most important criteria is 'are there specs or a free driver for it' - if not it doesn't get designed in. I'm sure there are loads of companies making this same choice, and I'm pretty confident that free drivers will win in the end (modulo life being made impossible by bad patent law).
Posted Dec 16, 2004 16:22 UTC (Thu) by mrshiny (subscriber, #4266)
Some people need other particular hardware to get their job done, and there is no chance to replace it with something better. As a hardware maker, you can make choices about the hardware and its openness, but as a hardware user I have to buy the hardware that does the job, or do without. For many people, doing without isn't an option.
Posted Jan 3, 2005 16:59 UTC (Mon) by atrius (guest, #26979)
Posted Dec 16, 2004 15:04 UTC (Thu) by elanthis (guest, #6227)
It's about _all_ modules. Even GPL modules that are in-tree. If 2.6.10 has new module FooWhiz for some new harder, the only way for any user to use that hardware is to upgrade to 2.6.10. Distros are not going to release upgraded kernels, *especially* with the new kenerl development "model" (if you can call it a model), because new point releases aren't just bug fixes and driver additions, they're practically all new kernels.
So the only way for a user to get a new, upgrade perfectly GPL module is to upgrade their entire kernel. Manually.
Posted Dec 16, 2004 16:18 UTC (Thu) by ewan (subscriber, #5533)
Posted Dec 16, 2004 16:30 UTC (Thu) by elanthis (guest, #6227)
You only get updated kernels with new drivers and new features when you upgrade your entire OS. If you are using a toy distro like Fedora, that might not be so bad, although having to potentially wait 6 months for a piece of hardware to start working is insane when, with a stable API, it could work _now_. If you are using a stable distro, you might have to wait a year or more.
Posted Dec 17, 2004 1:58 UTC (Fri) by mbp (subscriber, #2737)
People want to stay on a single kernel version because they don't want things to break. Upgrading device drivers is a good way to make things break.
Posted Dec 17, 2004 12:58 UTC (Fri) by mrshiny (subscriber, #4266)
Posted Dec 17, 2004 19:51 UTC (Fri) by giraffedata (subscriber, #1954)
The device drivers are part of the kernel (whether or not they're part of a Linux package distributed on kernel.org, and whether they are bound into the base kernel or loaded at run time).
The question is merely is it better to upgrade one kernel module (a particular device driver) or upgrade the entire kernel.
While there's a possibility that upgrading a part causes a problem that upgrading the whole would not, I think it's pretty obvious here that upgrading just one device driver module is safer than adding a year's worth of development spread out over an entire kernel to your system.
In fact, if upgrading one module didn't work because someone made an incompatible interface change, I would sooner patch the interface than bring in a whole new kernel.
Posted Dec 16, 2004 15:51 UTC (Thu) by gregkh (subscriber, #8)
Please see http://www.kroah.com/log/linux/stable_api_nonsense.html for details as to why we do not support binary kernel modules at all.
Posted Dec 16, 2004 16:40 UTC (Thu) by elanthis (guest, #6227)
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.
Posted Dec 16, 2004 19:26 UTC (Thu) by gregkh (subscriber, #8)
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 :)
Posted Dec 16, 2004 20:35 UTC (Thu) by mrshiny (subscriber, #4266)
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.
Posted Dec 17, 2004 2:17 UTC (Fri) by mbp (subscriber, #2737)
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?
Posted Dec 17, 2004 13:03 UTC (Fri) by mrshiny (subscriber, #4266)
Posted Dec 17, 2004 20:11 UTC (Fri) by giraffedata (subscriber, #1954)
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.
Posted Dec 20, 2004 17:30 UTC (Mon) by mwilck (guest, #1966)
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.
Posted Dec 17, 2004 2:02 UTC (Fri) by mbp (subscriber, #2737)
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.
Posted Dec 17, 2004 13:07 UTC (Fri) by mrshiny (subscriber, #4266)
Posted Dec 20, 2004 6:09 UTC (Mon) by rickmoen (subscriber, #6943)
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.
Posted Dec 16, 2004 18:02 UTC (Thu) by jschrod (subscriber, #1646)
Having such a ridiculous short backward compatibility time frame (or even none at all) is one of the very big disadvantages of Linux, compared to proprietary operating systems like Solaris, AIX, or Win32-flavored ones.
The current kernel development approach is botched, from a user's point of view. Not for a developer, mind you; but for end-users.
Posted Dec 16, 2004 19:30 UTC (Thu) by gregkh (subscriber, #8)
As for end-users, stick with a distro that provides a recent, up-to-date kernel, with full support for a wide range of devices, if that is important to you. Debian and Gentoo both provide this, as does Fedora.
It's all a matter of what is important to you, as a user. So base what you use, on those decisions (enterprise kernel vs. Debian bleeding-edge.)
Also remember, Linux supports more devices than any other operating system, "out of the box." And the fact that we do do this, shows that something must be working properly with this model :)
Posted Dec 16, 2004 21:00 UTC (Thu) by mrshiny (subscriber, #4266)
Posted Dec 16, 2004 8:54 UTC (Thu) by lolando (subscriber, #7139)
Posted Dec 16, 2004 11:01 UTC (Thu) by khim (subscriber, #9252)
And why the hell not ? Kernel upgrade is the only sane way to get new drivers.
Somehow people whine all the time that they just want new drivers and they do not want new kernel, but why ?
This is not a hoax:
[khim@mccme khim]$ cat /etc/redhat-release
Red Hat Linux release 6.2 (Zoot)
[khim@mccme khim]$ uname -a
Linux mccme.ru 2.6.9 #3 Sun Nov 28 22:33:46 MSK 2004 i686 unknown
Posted Dec 16, 2004 15:17 UTC (Thu) by mrshiny (subscriber, #4266)
The situation is a little different with linux, since you can upgrade JUST the kernel. But wait: you also need to upgrade some tools, and sometimes the C library. I ask you: why would you want to upgrade your kernel if it works just fine? If it's not broken, don't fix it. Just look at X.org: they are actually working to separate the driver releases from the core releases just so that people can get updated drivers more often than they update X.org. This would have saved me a lot of headaches in the early XFree86 4.x days, since every version of 4.0.x had slightly different drivers and features, and there were lots of regressions. I could have used an older driver with a newer core, or a newer driver with an older core. With the kernel, you can't do that.
Posted Dec 16, 2004 15:33 UTC (Thu) by NAR (subscriber, #1313)
Maybe for developers. But definitely not for users, because users only need support for their new hardware, they don't need the zillions of new features and the hundreds of new bugs related to the new features.
Posted Dec 16, 2004 15:54 UTC (Thu) by gregkh (subscriber, #8)
Posted Dec 16, 2004 16:38 UTC (Thu) by mrshiny (subscriber, #4266)
Anyway, I can see from your webpage that you disagree with my view, and since it's not my code I can't tell you how you should do things. Personally I think a binary API would help. But then, considering that we don't even have a "stable" and "development" kernel anymore, I guess there's really no place to decide where it's ok to break the API.
Posted Dec 17, 2004 2:33 UTC (Fri) by bk (guest, #25617)
Beyond that, now you can't even boot your PC without third-party motherboard binary drivers; it's so easy to develop and distribute proprietary drivers, why should hardware vendors bother with all this GPL nonsense? Sure, the core kernel is still free but it hardly matters anymore since any functional distribution requires a dozen or more third-party drivers to work correctly on a mainstream PC.
Posted Dec 17, 2004 3:58 UTC (Fri) by mbp (subscriber, #2737)
Posted Dec 20, 2004 17:35 UTC (Mon) by mwilck (guest, #1966)
Posted Dec 20, 2004 21:04 UTC (Mon) by mbp (subscriber, #2737)
It is, however, ultimately the only response to someone insists on something the projects' developers don't think is a good idea. It's easy to wish for ponies; the question is what are you going to do about it?
Posted Dec 17, 2004 10:06 UTC (Fri) by xav (guest, #18536)
You didn't read Greg's link, did you ? The day Linux has a stable ABI for its drivers, it's dead. That would mean a proliferation of binary-only drivers for Intel architecture only, closed source without any update nor bugfix. And no possibility of having interfaces evolving. In that case, you'd better run Windows with up-to-date mainstream hardware.
Posted Dec 17, 2004 13:15 UTC (Fri) by mrshiny (subscriber, #4266)
Posted Jan 3, 2005 17:13 UTC (Mon) by atrius (guest, #26979)
Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds