Linked by Thom Holwerda on Sun 22nd Jul 2007 00:33 UTC, submitted by liquidat
Linux Linus Torvalds included patches into the mainline tree which implement a stable userspace driver API into the Linux kernel. The stable driver API was already announced a year ago by Greg Kroah-Hartman. Now the last patches were uploaded and the API was included in Linus' tree. The idea of the API is to make life easier for driver developers: "This interface allows the ability to write the majority of a driver in userspace with only a very small shell of a driver in the kernel itself. It uses a char device and sysfs to interact with a userspace process to process interrupts and control memory accesses."
Thread beginning with comment 257132
To read all comments associated with this story, please click here.
I wonder...
by binarycrusader on Sun 22nd Jul 2007 02:10 UTC
binarycrusader
Member since:
2005-07-06

I wonder what all the pundits that have proclaimed that stable APIs are evil for years will say now that their beloved Linux kernel is providing one?

Reply Score: 1

RE: I wonder...
by kaiwai on Sun 22nd Jul 2007 02:26 in reply to "I wonder..."
kaiwai Member since:
2005-07-06

I wonder what all the pundits that have proclaimed that stable APIs are evil for years will say now that their beloved Linux kernel is providing one?


They will claim that there is a difference between a stable API for drivers in user space and one for kernel space.

For me, I think the real reason why they don't have a stable driver API is that it would require them to actually knuckle down and design something rather than merely just throwing at a wall to see what sticks.

When things like the USB stack have been rewritten 3 times, people here point to 'ooh, they're optimising' when in reality it has to do with a lack of planning - Linux kernel developers seem to ignore the cardinal rule that all programmers are taught regarding system design and analysis.

Edited 2007-07-22 02:40

Reply Parent Score: 5

RE[2]: I wonder...
by Almafeta on Sun 22nd Jul 2007 02:36 in reply to "RE: I wonder..."
Almafeta Member since:
2007-02-22

You seem to left out an important verb. They seem to what the cardinal rule? ^^;

Reply Parent Score: 1

RE[2]: I wonder...
by TBPrince on Sun 22nd Jul 2007 03:03 in reply to "RE: I wonder..."
TBPrince Member since:
2005-07-06

Completely agree. A stable API would require a better design while it appears that development mostly run in a semi-occasional way.

However, this is good news. If they will be able to keep it stable as promised, this could be a good evolution.

Reply Parent Score: 4

RE[2]: I wonder...
by aent on Sun 22nd Jul 2007 03:31 in reply to "RE: I wonder..."
aent Member since:
2006-01-25

That kind of is the whole argument of why no stable API is better. By just sticking to one design and not trying anything else or allowing that design to evolve with a stable API, they may be stuck with the original poor design as they are seeing how it is used. If they can redo the design a couple of times, then they can have a better design.

Taking the USB stack as an example, if they tried to keep the original design and make it a stable API, would that be better then the evolutionized and better API that they replaced it with as the USB technology progressed with stuff like USB 2.0 coming out? There are tradeoffs on both sides, and the argument was that for Linux's architecture and development process, they thought that a stable API would hinder the development they wanted, being able to correct any API issues that weren't well thoughtout the first time around without having to worry about any obsolete or deprecated APIs.

Reply Parent Score: 5

RE[2]: I wonder...
by butters on Sun 22nd Jul 2007 04:31 in reply to "RE: I wonder..."
butters Member since:
2005-07-08

For me, I think the real reason why they don't have a stable driver API is that it would require them to actually knuckle down and design something rather than merely just throwing at a wall to see what sticks.

So you're one of those intelligent design people. Still not convinced that biology works by random chance and natural selection?

I think it's understandable to believe that your deity of choice had the insight to create existence, sit back, pop open a cold one, and watch it play out exactly as He (She?) intended. But attributing the same level of insight to humans, and software developers in particular, is stretching beyond the realm of my ability to understand different points of view.

Certainly there's more standing in the way of human prescience than our failure to knuckle down. It could have something to do with our shockingly arrogant assertion of greatness in spite of our historical failure to achieve mere civility.

We have to keep throwing stuff at the wall, because not everything sticks. To settle for anything less is to squander whatever potential we actually have.

If we're going to do this free software thing, let's not leave any good idea untried. Let's challenge our preconceptions and give it everything we've got. Let's have no regrets and no apologies. Let's throw the notion of meritocracy at the wall and see if it sticks.

Edited 2007-07-22 04:46

Reply Parent Score: 4

RE[2]: I wonder...
by baadger on Sun 22nd Jul 2007 11:40 in reply to "RE: I wonder..."
baadger Member since:
2006-08-29

As you know, the idea behind a fluid internal API as well as a high frequency release cycle is to make the kernel more agile and see it provide support current technology more quickly.

Initially the result is the lack of a nice clean interfaces and a higher barrier for those trying to get into kernel development (lack of documentation) but it certainly doesn't result in the loss of generic device layers.

As examples look at the new wireless stack (that admittedly we have yet to see a lot of drivers mvoe over too) and libata. Both are good examples of convergence of code and functionality in the kernel. These layers just take time to emerge and are introduced into mature areas of the kernel, there's really no point developing such a layer if over the next X years a whole new class of related devices are going to come along and you haven't foreseen them in your design.

I put you to what is worse: a little continuous effort by driver developers to keep up or developers writing hacks to shoehorn their 2007 hardware into an API that was designed in 2001 (think Windows XP)?

Isn't it true that most wireless drivers for XP have had to implement the majority of their own wireless stack?

Reply Parent Score: 5

RE[2]: I wonder...
by abraxas on Mon 23rd Jul 2007 01:17 in reply to "RE: I wonder..."
abraxas Member since:
2005-07-07

When things like the USB stack have been rewritten 3 times, people here point to 'ooh, they're optimising' when in reality it has to do with a lack of planning - Linux kernel developers seem to ignore the cardinal rule that all programmers are taught regarding system design and analysis

You would like to believe that is the case but it isn't. The USB drivers are a lot better than the drivers available for Windows or OSX. The reason they are better is because they don't have to worry about backwards compatibility. Sure the Windows USB drivers are stable but they suck in comparison. Microsoft could probably write better drivers now if they wanted to but they would have to sacrifice compatibility.

What people like you fail to realize is that a lot of the rewriting that goes on is re-factoring. There are advantages to stabilizing on an API but there are also advantages not to.

Reply Parent Score: 3