User: Password:
|
|
Subscribe / Log in / New account

GNU + Linux = broken development model

GNU + Linux = broken development model

Posted Jul 31, 2009 4:47 UTC (Fri) by ebiederm (subscriber, #35028)
In reply to: GNU + Linux = broken development model by mikov
Parent article: A tempest in a tty pot

In Linux API stability is generally provided by the rule that if you change the API you have to fix all of the drivers. If there are a lot of drivers that is a lot of work to change everything.

So if an API changes under you (in linux) for a driver that means either you are using something esoteric that few other drivers use and their was very little pain in changing it. Or you are using something for which someone felt the pain of changing it was worth the gain.

Since it is a lot of work to change an API with a lot of users the churn rate should be reasonable, and it should not need to be a full time job.

Where have you seen the rate of change in the linux kernel APIs churn so fast it was a full time job to keep up?

And yes there are periodic rants about not changing the driver APIs too much as well.


(Log in to post comments)

GNU + Linux = broken development model

Posted Jul 31, 2009 5:30 UTC (Fri) by dlang (subscriber, #313) [Link]

remember that the other poster is complaining about the effort to maintain an out-of-tree driver. those don't get fixed when the api changes

out of tree

Posted Jul 31, 2009 6:33 UTC (Fri) by alex (subscriber, #1355) [Link]

And therein lies the problem. Out of tree is not an efficient way to develop a Linux driver.

out of tree

Posted Jul 31, 2009 8:04 UTC (Fri) by mikov (subscriber, #33179) [Link]

That's the common opinion expressed in "Documentation/stable_api_nonsense.txt". Yet, some people disagree with it.

Having a driver in tree guarantees only that the driver compiles, nothing more. The responsibility for testing the driver still lies with the manufacturer, though the manufacturer has no direct control over what goes into the kernel. So, the manufacturer is forced to track which bugs are in which kernels (and which distributions), which patches have been accepted, when, why not, etc. As I mentioned elsewhere this is a full time job and not a fun one.

Having the driver in-tree actually increases the burden to the manufacturers because now they can't control what their customers are getting. Realistically they have to maintain both an in tree and out of tree version, or they just give up on Linux.

Plus, the whole idea that every single driver should be in tree is frankly dishonest. Is the kernel driver tree going to grow forever with every single device ever manufactured? What's the point? Who is going to really audit and test all these drivers for every single API change? Let's not kid ourselves, this is not happening and is not going to happen.

As a whole this centralized model is unsustainable. The maintenance of the drivers should be left to the hardware manufacturers, who have customers and financial motivation to produce quality drivers. These manufacturers shouldn't have to track every possible kernel release as long as they comply with the stable API. (Plus, of course, the drivers being GPL is incredibly useful for the quality).

The end users in turn shouldn't have to jump through hoops to get new hardware working if a driver exists.

out of tree

Posted Jul 31, 2009 11:38 UTC (Fri) by ebiederm (subscriber, #35028) [Link]

No direct control? Device driver patches are accepted readily, so if you aren't getting your patches accepted something very strange is going on.

If a driver has a weird set of bugs on a lot of different platforms it sounds fragile and no amount of stable APIs will help.

As for manufacturers doing a better job with out of tree drivers quite often hardware manufacturers build a device for a short while sell it and quickly become no longer interested in it. Which makes a community model where all the people who care (not just the hardware manufacturer) can participate a better thing.

With our real world examples I can't see where you are coming from.

out of tree

Posted Jul 31, 2009 15:06 UTC (Fri) by mikov (subscriber, #33179) [Link]

No direct control? Device driver patches are accepted readily, so if you aren't getting your patches accepted something very strange is going on.

Let's say I am a manufacturer and I receive a bug report from a customer. How am I supposed to fix it? Submit a patch to LKML and tell the customer to wait for a new kernel version? That is absurd. So, I have to maintain an out-of-tree driver in any case. I want my customers to use the same driver in all kernel versions.

In general linking a particular driver version to a particular kernel version is just stupid. If I have one a single misbehaving driver I have to update my entire kernel, making many more unnecessary changes. That is is a support and maintenance nightmare.

As for manufacturers doing a better job with out of tree drivers quite often hardware manufacturers build a device for a short while sell it and quickly become no longer interested in it. Which makes a community model where all the people who care (not just the hardware manufacturer) can participate a better thing.

All drivers must still be GPL, of course, so people can participate if they want. But before all, it must be easy for the original manufacturer to participate because that is the most efficient way to do it. Currently, it is very expensive to do that and that is at least part of the reason why many hardware manufacturers aren't doing it at all.

out of tree

Posted Jul 31, 2009 15:17 UTC (Fri) by mjg59 (subscriber, #23239) [Link]

On the other side of the issue, we've seen that vendor drivers often provide custom interfaces, engage in awkward hacks and generally provide a lower level of integration with existing kernel functionality than in-tree drivers. Users generally prefer in-tree drivers because they get a more consistent experience.

out of tree

Posted Jul 31, 2009 16:28 UTC (Fri) by johill (subscriber, #25196) [Link]

It's not that hard to backport. We do it almost automatically: http://wireless.kernel.org/en/users/Download

out of tree

Posted Aug 1, 2009 10:04 UTC (Sat) by nix (subscriber, #2304) [Link]

Let's say I am a manufacturer and I receive a bug report from a customer. How am I supposed to fix it? Submit a patch to LKML and tell the customer to wait for a new kernel version? That is absurd. So, I have to maintain an out-of-tree driver in any case. I want my customers to use the same driver in all kernel versions.
What? You maintain a git repo, the same way anyone else doing kernel development does, and feed one branch to Linus and the other to your customers. This is really not even slightly rocket science, and git has plenty of tools to help keep the branches in sync.

out of tree

Posted Aug 1, 2009 16:29 UTC (Sat) by mikov (subscriber, #33179) [Link]

Oh, come on, the issue here is not the source control tool. Git is not magically going port your driver between versions. (BTW, I am a git fanatic, but that's another subject).

A successful compilation is not sufficient. Every release has to be exhaustively tested. Maintaining several slightly different versions of the same driver, plus tracking the yet different version which may or may not have been accepted in the mainline, is a lot of work. Especially if you have direct customers.

You absolutely need to maintain an out-of-tree driver. There is no two ways about it.

Look, this is not theoretical. This is my real experience and it has been that out of tree drivers are much more convenient for the users. If I need support for a piece of hardware, I download the module source, compile it and use it. No kernel upgrades, no backports, no crap. If I am going to install an out-of-tree driver, I actually prefer the mainline not to have one.

So, anything that makes it easier to maintain out of tree drivers would be good in my book. Of course everything must be GPL, and it would be nice if there was a centralized repository for these drivers so you don't have to hunt for them.

out of tree

Posted Aug 2, 2009 1:39 UTC (Sun) by foom (subscriber, #14868) [Link]

This is my real experience and it has been that out of tree drivers are much more convenient for the users.

As a user: yuck. Not only are out of tree drivers more irritating to use/install/upgrade than in-tree ones, my experience has been that they're also always buggier.

And I don't want to have to download the module source, compile it, and use it: I want the device to just work when I plug it in, without even thinking about it.

On the other hand, I do like it, when the driver is brand new, if an out-of-tree version is made available for use with older kernel versions. Certainly it's helpful to provide an out-of-tree version for the first year or two until everyone's upgraded to a kernel with the driver included already.

out of tree

Posted Aug 2, 2009 14:03 UTC (Sun) by alex (subscriber, #1355) [Link]

It would be nice if the distros could compile out-of-tree snapshots in a nice user friendly way. But for this to work they have to be GPL source code and not arbitrary binary blobs.

Certainly for me as a developer the current wireless testing tree/compat layer is an example of doing it right. I can run wireless with my distro kernel but still have the latest greatest without upgrading the kernel if I want. I wonder if more out-of-tree's could follow the wireless model.

out of tree

Posted Aug 2, 2009 21:05 UTC (Sun) by johnflux (guest, #58833) [Link]

It's good to get other opinions here, and it's certainly interesting to hear arguments for out-of-tree drivers.

But one very important question comes to mind:

What happens when you no longer support that hardware? What happens if your company goes bankrupt, reduces in size, etc, and can no longer support the out-of-tree driver?

You then end up in a situation where users cannot ever upgrade their kernel because your out-of-tree driver is no longer being upgraded.

I worked for a company that has an out-of-tree driver. We ended up only officially supporting quite an old kernel. This screwed over customers that needed a newer kernel (typically for newer power management features)

out of tree

Posted Aug 3, 2009 4:47 UTC (Mon) by mikov (subscriber, #33179) [Link]

What happens when you no longer support that hardware? What happens if your company goes bankrupt, reduces in size, etc, and can no longer support the out-of-tree driver? You then end up in a situation where users cannot ever upgrade their kernel because your out-of-tree driver is no longer being upgraded.

Well, since the out-of-tree drivers still must be GPL, if the hardware manufacturer doesn't want to support it, anybody else can do it. Nothing changes in that respect. A stable API gives us best of both worlds.

I worked for a company that has an out-of-tree driver. We ended up only officially supporting quite an old kernel. This screwed over customers that needed a newer kernel (typically for newer power management features)
I completely agree that, as things are currently, an out-of-tree driver is a lot of work to maintain. That's precisely why I am arguing for a stable API. Then ideally an out-of-tree driver would work with any kernel. If there happen to be driver API changes (realistically those can't be avoided) they will be formally versioned and documented so porting will be routine.

out of tree

Posted Aug 3, 2009 6:38 UTC (Mon) by johnflux (guest, #58833) [Link]

Out-of-tree drivers don't have to be GPL (well, that's a up to debate, but there are certainly proprietary drivers). And even if it's GPLed, if it's out of tree then there's a good chance that it doesn't meet the coding standards for inclusion into the kernel - for example a company typically might have a single source for Windows and Linux, with hundreds of #ifdef's to switch between them. There is also often a custom build system, revision control system, etc.

So this means that once the company goes bankrupt, some volunteer has to take code that he's probably never looked at before and undertake what could be a large task to clean up and adapt the driver for inclusion into the kernel.

out of tree

Posted Aug 3, 2009 17:48 UTC (Mon) by mikov (subscriber, #33179) [Link]

Out-of-tree drivers don't have to be GPL (well, that's a up to debate, but there are certainly proprietary drivers).

That is not really true. I am not aware of anything that allows a Linux kernel driver to be non-GPL. The only gray area is if the driver has been ported from another OS, and this is also questionable. I have seen more than one clear statement from Linus Torvalds on this subject.

There is no question that people violate the Linux GPL all the time. It is ethically disgusting (although I actually understand very well why they do it).

But in any case, a stable source API has not relevance to that problem.

And even if it's GPLed, if it's out of tree then there's a good chance that it doesn't meet the coding standards for inclusion into the kernel - for example a company typically might have a single source for Windows and Linux, with hundreds of #ifdef's to switch between them. There is also often a custom build system, revision control system, etc.

And that is bad because? The current standards are needed because the kernel developers have to be able to "maintain" (more like coax into compiling) a mountain of drivers they don't care about. If the drivers are maintained by interested 3rd parties, it doesn't matter in the least, and those 3rd parties should choose whatever standards of their own they prefer.

So this means that once the company goes bankrupt, some volunteer has to take code that he's probably never looked at before and undertake what could be a large task to clean up and adapt the driver for inclusion into the kernel.

I am sorry but this is a logical fallacy. This volunteer is free to develop a driver of his own using his superior coding standards from day one. Plus, surely having an existing working driver is much better than starting from scratch.

Look, I am well aware that the idea for a stable API is not popular and for sure I am not the best advocate for it. I actually don't think that a stable API will happen. But I also know what I am seeing in my professional life and it doesn't look good.

Also (sorry to repeat myself) it is clear to me that with the current situation Linux will never be really successful on the desktop. The stable API is just one of the several reasons for that, but it isn't a small one.

out of tree

Posted Aug 3, 2009 20:08 UTC (Mon) by johnflux (guest, #58833) [Link]

> I am sorry but this is a logical fallacy. This volunteer is free to develop a driver of his own using his superior coding standards from day one. Plus, surely having an existing working driver is much better than starting from scratch.

There's no logical fallacy there. I stated that an out-of-tree driver requires a lot of work to get into the kernel if it has to be done once the company has gone bankrupt, compared to if the driver was in the tree in the first place. But you're stating that an out-of-tree driver is easy than no driver at all which is true, but not really relevant to an in-tree or out-tree discussion.

I do get where you're coming from, but I do think that in the long run, Linux will have the bigger advantage of having all the drivers in tree.

The other day, for example, I need to get a webcam working on an ARM device. In linux it was easy because all the drivers were just there. I plugged in the webcam and it just worked.
That sort of thing is simply not possible in Windows.

Likewise I dread re-installing Windows because the drivers for my wireless card are difficult to get. The company that made the drivers has since gone and their website is now down.

out of tree

Posted Aug 3, 2009 22:14 UTC (Mon) by mikov (subscriber, #33179) [Link]

There's no logical fallacy there. I stated that an out-of-tree driver requires a lot of work to get into the kernel if it has to be done once the company has gone bankrupt, compared to if the driver was in the tree in the first place. But you're stating that an out-of-tree driver is easy than no driver at all which is true, but not really relevant to an in-tree or out-tree discussion.

I do get where you're coming from, but I do think that in the long run, Linux will have the bigger advantage of having all the drivers in tree.

Well, you are implying that it is somehow "bad" to have an existing working GPL driver, which just happens to be out of tree. That is the fallacy. In fact it cannot possibly negatively affect the desired outcome, which is to have a working driver.

I actually think that there should be no drivers in tree. That is an unmanageable situation - keeping all possible drivers in one monolithic source tree, and upgrading them at every kernel release. It should be obvious that this simply cannot scale. You cannot expect a finite number of developers to maintain a potentially infinite number of drivers for ever.

The other day, for example, I need to get a webcam working on an ARM device. In linux it was easy because all the drivers were just there. I plugged in the webcam and it just worked. That sort of thing is simply not possible in Windows.

That is a funny example because I have exactly the opposite experience with an embedded project. It is not possible to buy a working camera for it because its kernel can't practically be upgraded. And even with a modern kernel, I can't find a single webcam from Fry's to work on my Linux desktop.

AFAIK, there is a very high turnover rate with webcam chips, so it simply does not make economic sense to maintain a driver for hardware whose life is 6 months. Now, if only there was a stable driver API ... :-)

Likewise I dread re-installing Windows because the drivers for my wireless card are difficult to get. The company that made the drivers has since gone and their website is now down.

I don't get it. Why would you have to re-install Windows for a single driver?

Let's for a second forget about the labels Linux and Windows and look at it as impartial scientists performing an experiment. We have "OS A" which owns 99% of a market, and "OS B" which has 0.5% and doesn't seem to be growing even though it is much cheaper (!?!). What reasons could we have, as impartial scientists, to believe that "OS B" is somehow superior?

Personally I obviously think that Linux is superior in many respects, or I wouldn't be here. But I am sure that that it is despite the lack of stable API, not because of it.

out of tree

Posted Aug 3, 2009 22:19 UTC (Mon) by dlang (subscriber, #313) [Link]

what makes you think that the pool of developers to maintain the drivers in the kernel is finite while the pool of drivers is not?

the number of people who contribute to the kernel continues to grow.

you believe that the unstable API is a drawback, many others believe that is is a strength.

the people that you need to convince are not here, you need to go elsewhere to convince them.

out of tree

Posted Aug 3, 2009 23:55 UTC (Mon) by mikov (subscriber, #33179) [Link]

the people that you need to convince are not here, you need to go elsewhere to convince them.

Do you mean this in the sense "shut up and go away"?

I don't want to convince anybody. I think that a stable API is a lost cause, like Linux on the desktop, or Linux gaming. It is time to wake up and smell the flowers. The desktop PC is almost gone.

I am curious about intelligent objections against a stable API, but I am not crazy to go get flamed on LKML. (If you do a search, there have been others, brave or stupid enough to post about a stable API there. LOL. Poor suckers. They deserved what was coming to them.)

The people who would need convincing are the big companies who pay for Linux kernel development. It is more than a bit naive to think that volunteers in their free time can influence Linux at this point of its development. But I have a pretty good theory why RedHat, Novell, etc, aren't interested in a stable API.

out of tree

Posted Aug 4, 2009 0:38 UTC (Tue) by foom (subscriber, #14868) [Link]

I'm pretty sure I don't use any 3rd party drivers on my Mac laptop, and I certainly haven't missed
them or thought MacOS was not ready-for-the-desktop because of it...

out of tree

Posted Aug 4, 2009 4:47 UTC (Tue) by mikov (subscriber, #33179) [Link]

Yeah right. Which parts of your Mac did you buy from a different hardware vendor?

out of tree

Posted Aug 3, 2009 22:29 UTC (Mon) by johnflux (guest, #58833) [Link]

Well, you are implying that it is somehow "bad" to have an existing working GPL driver, which just happens to be out of tree.

_Compared_ to having it in tree. That's all I've ever said.

> That is the fallacy. In fact it cannot possibly negatively affect the desired outcome, which is to have a working driver.

Compared to not having it at all, sure.

> That is a funny example because I have exactly the opposite experience with an embedded project. It is not possible to buy a working camera for it because its kernel can't practically be upgraded.

Why can't it be upgraded? Because of an out-of-tree driver? :-D

> And even with a modern kernel, I can't find a single webcam from Fry's to work on my Linux desktop.

I find that unlikely :-) I've bought 4 webcams randomly, 2 built into laptops, and all just worked in linux.

> I don't get it. Why would you have to re-install Windows for a single driver?

Nah, I meant that if I re-install, for an unrelated reason, then I have trouble getting the drivers.

out of tree

Posted Aug 3, 2009 23:38 UTC (Mon) by mikov (subscriber, #33179) [Link]

Why can't it be upgraded? Because of an out-of-tree driver? :-D

Laugh all you want :-) But it is a real problem that should not exist... Ignoring it doesn't make it any less important for the developers and users of this product.

I find that unlikely :-) I've bought 4 webcams randomly, 2 built into laptops, and all just worked in linux.

Well, I am not making it up. BTW, I am running Kubuntu LTS and Debian Stable on my desktops. Perhaps you see my problem? ;-)

Nah, I meant that if I re-install, for an unrelated reason, then I have trouble getting the drivers.

Well, that is the problem of closed source, no argument from me there.

BTW, you can still save the drivers. You have to copy the INF file and the files referenced from it and you can reinstall them on a new system without any tricks. Some things in Windows really are that easy :-)

out of tree

Posted Aug 4, 2009 8:06 UTC (Tue) by farnz (subscriber, #17727) [Link]

The thing is, and this is from direct personal experience, companies maintaining out of tree drivers don't put their driver through the Linux code review process; as a result, they ignore standard Linux interfaces in favour of inventing their own.

Add to that the fact that they lose interest in maintaining their driver at all when they've moved onto the new shiny (in the case of one vendor I've dealt with, the driver stops being maintained as soon as they have a new chip out, even though they're still selling the old chip), and the fact that I don't have the time to do more than bugfix drivers that have already been ported to new APIs, and I find myself thinking that all the advantages you claim for out of tree drivers are disadvantages from my perspective.

I want one place to go to for drivers. Not twenty trees, but the one tree on kernel.org. I have found it easier to backport drivers from 2.6.30 to 2.6.23 than to integrate vendor drivers, so I would prefer in- aiming to move into the tree (before GregKH's staging area), and that was quite enough pain.

I'm also afraid that your admission that you're stuck on an old kernel due to an out-of-tree driver from your board vendor reminds me of a subset of nVidia graphics card owners, who complain bitterly (regardless of technical reasons) when X.org releases a new version of the X server that isn't backwards compatible with the ancient version of the nVidia drivers that supports their older hardware; I do feel that you should be exerting pressure on your vendor to make this happen, either by getting their drivers into the kernel, or getting them to step up and do the work of maintaining a stable in-kernel API. It's not going to come for free, so why shouldn't the people who want such an API do the work of maintaining it?

out of tree

Posted Aug 4, 2009 20:51 UTC (Tue) by mikov (subscriber, #33179) [Link]

> The thing is, and this is from direct personal experience, companies
> maintaining out of tree drivers don't put their driver through the Linux
> code review process; as a result, they ignore standard Linux interfaces
> in favour of inventing their own.

I have no opinion about this because I haven't personally experienced it, but I believe you. But why isn't this a problem in Windows?

> Add to that the fact that they lose interest in maintaining their driver
> at all when they've moved onto the new shiny (in the case of one vendor
> I've dealt with, the driver stops being maintained as soon as they have
> a new chip out, even though they're still selling the old chip), and the
> fact that I don't have the time to do more than bugfix drivers that have
> already been ported to new APIs, and I find myself thinking that all the
> advantages you claim for out of tree drivers are disadvantages from my
> perspective.

Agreed, but what is your point? You are describing exactly the problems caused by a lack of stable API. Vendors do not want to maintain drivers for hardware which they no longer sell, because it is a never ending cycle of completely pointless but expensive work (from their standpoint). That would not be the case if there was a stable API.

First, it would be very cheap for them to continue the maintenance, so they would likely do it. Second, even if they didn't, the driver should just continue to work. And lastly, a volunteer can pick it up at any moment.

> I want one place to go to for drivers. Not twenty trees, but the one
> tree on kernel.org. I have found it easier to backport drivers from
> 2.6.30 to 2.6.23 than to integrate vendor drivers, so I would prefer in-
> aiming to move into the tree (before GregKH's staging area), and that
> was quite enough pain.

Well, that is you but you are the exception. 99.9% of the Linux users and most of the developers can't backport a driver. While I personally also could do it, there is more than that - for example I don't really have time or support such backported driver in a business setting.

There is definite value in a central repository for drivers. The problem with the current approach is that the release cycles of all drivers are tied together. Ideally I would like to see a central repository where vendors are free to upload their drivers whenever they want.

> I'm also afraid that your admission that you're stuck on an old kernel
> due to an out-of-tree driver from your board vendor [...]

I have never said that. I mentioned a problem where newer webcam drivers are only available for new kernels. This has nothing to do with in-tree vs out-of-tree drivers; it is precisely a matter of lack of stable API.

It seems that many people who responded negatively to my comments here are confusing a couple of related by separate issues:

* Stable API. It is equally beneficial to in-tree and out-of-tree drivers because in either case it decreases the maintenance burden. In fact contrary to the common wisdom, a stable API gives more freedom to core developers to make changes because they can keep them isolated behind the facade of the stable API.

* In-tree vs out-of-tree drivers. It is true that a stable API decreases the incentive to submit drivers to the kernel because the "free maintenance" red herring is gone. But if people perceive value in having a central point for driver development, there is nothing stopping them.

* Closed source drivers. This is completely unrelated to a stable source level API. They are prohibited by the kernel license and suffer from their well known problems.

> reminds me of a
> subset of nVidia graphics card owners, who complain bitterly (regardless
> of technical reasons) when X.org releases a new version of the X server
> that isn't backwards compatible with the ancient version of the nVidia
> drivers that supports their older hardware;

I would like to see an open source Nvidia driver as much as the next guy, but I have to disagree with you. How did Microsoft manage to keep their graphics driver API the same from NT 3.1 to Windows XP? To think that it is a bad thing is to ignore reality.

> I do feel that you should be
> exerting pressure on your vendor to make this happen, either by getting
> their drivers into the kernel, or getting them to step up and do the
> work of maintaining a stable in-kernel API. It's not going to come for
> free, so why shouldn't the people who want such an API do the work of
> maintaining it?

Agreed in theory. But you are forgetting that these vendors don't need to support Linux at all. It is less than 1% of their market, but it takes more work to support that Windows. So, why the hell would they do it at all?

So, they don't have to do anything. It is not their problem. If the Linux community wants to bring these vendors fully on board, it should make it easy for them. Easier than Windows. The major factor for "easiness" is stable APIs.

out of tree

Posted Aug 5, 2009 10:32 UTC (Wed) by farnz (subscriber, #17727) [Link]

> The thing is, and this is from direct personal experience, companies > maintaining out of tree drivers don't put their driver through the Linux > code review process; as a result, they ignore standard Linux interfaces > in favour of inventing their own. I have no opinion about this because I haven't personally experienced it, but I believe you. But why isn't this a problem in Windows?

It is a problem in Windows, too; for example, very few graphics card drivers support Windows native screen rotation in XP - you need to use a vendor utility instead. The difference is that Windows users are used to this, and don't complain as loudly about it. It's becoming less of an issue as things like USB standardize more and more device classes, and manufacturers use the standard classes, because that means that the device is Plug And Play under currently shipping Windows systems (Vista, future Windows 7 installs).

> Add to that the fact that they lose interest in maintaining their driver > at all when they've moved onto the new shiny (in the case of one vendor > I've dealt with, the driver stops being maintained as soon as they have > a new chip out, even though they're still selling the old chip), and the > fact that I don't have the time to do more than bugfix drivers that have > already been ported to new APIs, and I find myself thinking that all the > advantages you claim for out of tree drivers are disadvantages from my > perspective. Agreed, but what is your point? You are describing exactly the problems caused by a lack of stable API. Vendors do not want to maintain drivers for hardware which they no longer sell, because it is a never ending cycle of completely pointless but expensive work (from their standpoint). That would not be the case if there was a stable API.

Oops - my bad. I forgot to mention that the case in question was migrating from NT4 to XP in an embedded product. We could still buy the chips in question, but the NT4 driver didn't work in XP, even after we recompiled it against the new DDK (don't know why - I thought there was a stable API?). We ended up having to buy new ASI capture chips, and scrapping the older hardware.

> reminds me of a > subset of nVidia graphics card owners, who complain bitterly (regardless > of technical reasons) when X.org releases a new version of the X server > that isn't backwards compatible with the ancient version of the nVidia > drivers that supports their older hardware; I would like to see an open source Nvidia driver as much as the next guy, but I have to disagree with you. How did Microsoft manage to keep their graphics driver API the same from NT 3.1 to Windows XP? To think that it is a bad thing is to ignore reality.

They didn't keep the graphics driver API the same from NT 3.1 to Windows XP. Newer OSes cannot run graphics cards using older drivers, pure and simple. No different to Linux, in that respect.

And note that vendors do need to bring the Linux community on board - my employer alone buys a significant number of TV capture cards a month, on condition that they are supported under Linux. We pay a slight premium to buy Hauppauge cards because of the Linux support; other vendors are £5/card cheaper, but cost huge amounts of money in expensive developer time keeping the card going.

out of tree

Posted Aug 5, 2009 18:05 UTC (Wed) by mikov (subscriber, #33179) [Link]

It is a problem in Windows, too; for example, very few graphics card drivers support Windows native screen rotation in XP - you need to use a vendor utility instead.

I don't want to defend Windows, but IIRC that is technically wrong. Unless I am mistaken, XP does not support native screen rotation. It was introduced in Vista.

I do agree with your general point that you can't rely on the vendors to "do the right" thing. Vendors do suck. I have seen really really horrible disgusting things working with closed source drivers. But this is an impossible battle. You can't require all developers for your OS to be perfect. People will do whatever they want to do. The best you can do is give them tools encouraging them in the right direction. Plus, hopefully GPL will shame them into better code.

Look at Google Android. They are basically doing whatever they want with the kernel and not bothering to submit anything back.

They didn't keep the graphics driver API the same from NT 3.1 to Windows XP. Newer OSes cannot run graphics cards using older drivers, pure and simple. No different to Linux, in that respect.

I am sorry but that is not quite true either. In a previous life I used to do Windows kernel development, and graphics drivers specifically. I have ported drivers from NT4 to W2K and WXP. The API remained backwards compatible and even binary compatible.

In NT4 they did a fundamental architectural change by moving the drivers into the kernel, but the source level API remained compatible with NT 3.51.

And note that vendors do need to bring the Linux community on board - my employer alone buys a significant number of TV capture cards a month, on condition that they are supported under Linux. We pay a slight premium to buy Hauppauge cards because of the Linux support; other vendors are £5/card cheaper, but cost huge amounts of money in expensive developer time keeping the card going.

I don't quite follow. Can you please clarify a bit? Why do the other cards need huge amounts of money? Also, you are saying that Hauppauge is more expensive because it has to support Linux. So, how is that a good thing?

out of tree

Posted Aug 5, 2009 18:15 UTC (Wed) by johnflux (guest, #58833) [Link]

> I don't quite follow. Can you please clarify a bit? Why do the other cards need huge amounts of money? Also, you are saying that Hauppauge is more expensive because it has to support Linux. So, how is that a good thing?

I think his point was that his company was willing to pay extra just for linux support. So Hauppauge was able to charge more money, and still get his custom. Whereas the companies that didn't support Linux didn't get his business.

From a business point of view, if the money that a company loses because of their lack of linux support is greater than the cost of opening the specs or writing the drivers, then the company should write Linux drivers. The poster was providing anecdotal evidence to indicate that they believe that this is the case for some (most?) companies.

On a personal note, I think companies perceive the cost of opening their drivers to be far higher than it really is.

out of tree

Posted Aug 5, 2009 18:45 UTC (Wed) by farnz (subscriber, #17727) [Link]

Hauppauge cards tend to work out of the box with a recent enough kernel; when they don't, Hauppauge employees are happy to help you make the cards work. Other vendors cards require developer time to make work, and attempts to get the vendor to help tend to be fruitless (they have their own out of tree driver that doesn't work well, due to reinvention of interfaces, and don't understand why you won't simply rewrite your userspace to match their driver).

Developer time is hugely expensive, as we don't have much to spare; given the choice between a small amount of extra money per card (to the vendor), or developer time, we'd rather pay. If you're a vendor, looking to expand, this is a market, and it has money to spend on you.

out of tree

Posted Aug 6, 2009 6:28 UTC (Thu) by lysse (guest, #3190) [Link]

> this is from direct personal experience

So why are you generalising from it?

out of tree

Posted Aug 6, 2009 8:10 UTC (Thu) by farnz (subscriber, #17727) [Link]

I'm generalising from experience of 15 to 20 vendors, of whom only a couple had their drivers upstreamed. The remainder simply did not understand why (to use some examples) I didn't want to use their vendor- specific DVB-T tuning interface instead of Linux's DVB API, or their vendor-specific video capture interface instead of V4L2.

However, I recognise that my experience may be atypical; I therefore mention that I base this on personal experience, so that if I've just had bad luck with vendors, other people can point out vendors who get it right.

out of tree

Posted Aug 7, 2009 22:31 UTC (Fri) by Los__D (guest, #15263) [Link]

This is not much different on Windows.

Stupid devices which needs stupid programs to do what a perfectly capabable standard Windows configuration tool should be doing seems to be more the rule that the exception.

- The worst part is that Windows seems to support that ridiculous way of doing it. i.e. the Wi-Fi configuration tool has an option to transfer control to a 3rd party program.

(To be fair, this seems to be getting a bit less frequent lately).

out of tree

Posted Aug 10, 2009 16:43 UTC (Mon) by vadim (subscriber, #35271) [Link]

Let me give you my opinion as an user: As far as I'm concerned, if your hardware doesn't have a driver in the mainline kernel, it doesn't have one. And that means I don't buy it. And that's not a huge hindrance, since Linux has modules for everything these days. A device that only has an out of tree module is a rare exception and easily avoided.
Having the driver in-tree actually increases the burden to the manufacturers because now they can't control what their customers are getting.
But I'm not that interested in you controlling what I'm getting. If I have a 3Com card, I need it to work. Who makes it work isn't particularly important. If it stops working, I don't go to 3com.com, I expect my distro to ship a fix. It's actually something I love about Linux - on Windows every driver comes with random crap attached. Webcams can't just be webcams, they have to ship some horrible interface as well, without which it's impossible to have full control of the device. I much prefer the Linux model: The webcam is an image capture device, nothing more. Every webcam works identically via a common API. If I remove one and plug in another, capabilities of the hardware aside, nothing changes. That's precisely how I like it.

GNU + Linux = broken development model

Posted Jul 31, 2009 21:54 UTC (Fri) by ebiederm (subscriber, #35028) [Link]

The key point is that despite stable api nonsense and a lot of talk of a nonstable ABI to drivers, the kernel driver API has a lot of inertia and resistance to change. Generally new apis are introduced while still providing the old api. Eventually the old API goes away but rarely does it happen in a single kernel release.

The kernel ABI because it depends on Kconfig options is much less stable and there are a lot to choose from on any given release.

In general things don't change willy nilly and kill your driver, even out of tree.

Thinking back on my experiences maintaining code out of tree for sometimes years at a time before it was merged. Yes there are changes but they aren't hard too hard to keep up with.

From the other side as one of the people who make changes in the APIs a lot of work is done to make it as painless as possible for the driver developers. With both the old and the new apis living side by side for a while.


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