Linux Kernel To Have Stable Userspace Drive 309
liquidat writes "Linus Torvalds has 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. The last patch to Linus' tree included the new API elements. The idea 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.'"
Better drivers and more of them (Score:5, Insightful)
I wonder if it would be easy to port it to windows and macosx? IT would be cool for hardware makers to have a driver that works with all operating systems with minimal effort in porting. Costs are one of the issues besides the difficulty in porting windows drivers to linux which many makers do not bother doing.
Re:Better drivers and more of them (Score:5, Funny)
If only there were some magical pool of experienced labor just waiting to write and maintain, in perpetuity, Linux drivers for any manufacturer of any hardware....
Re: (Score:2)
Re:Better drivers and more of them (Score:5, Insightful)
i would personally like to see all pieces of hardware sold with schematics for the hardware. with other products, like cars, this is trivial anyway--anybody can open up the car and see what bit goes where. with computer hardware, because of things like microcode, this is impossible.
and as for intellectual property. what strikes me is how this phrase is always used to protect the financial interests of a company against the greater good for society and the individual. if someone would instead be honest and say "companies are allowed to require society to install software (which does what exactly?) and use a particular operating system if the user wants to use their hardware, so ensuring (at the least) that the product will soon be unusable" then i'd have less against the people who champion this position
in the best case, this is built-in obsolescence. one thing i find repugnant is the attitude that it is morally okay to force society into this position.
Re: (Score:3, Insightful)
secondly, there already exists a framework to protect intellectual property. we call it the law.
thirdly, i don't see how anything is being taken away from the company.
i suppose what i'm really against is technology being used to restrict the freedoms and capabilities of the individual when the safety of the individual is not at stake. by all means the law can be used, but the law always has to consider the freedom of the individual fir
Re: (Score:2, Interesting)
In the case you're arguing for, how is the technology restricting the freedoms and capabilities of the individual?
You can still work out yourself how to communicate with the device, you can still work out the motherboard connections etc. What you really want is a free handout. The companies that make tech products are under no obligation, moral or otherwise, to help you there. The only moral
Re:Better drivers and more of them (Score:5, Insightful)
Am I missing something here?
Re:Better drivers and more of them (Score:4, Informative)
To make it even worse, I'm told that many wifi cards are only legal because they're not open-source. Sound bizarre? When they're sold, they're sold with certain restrictions on frequency and power. These restrictions are located entirely within the drivers. If they distributed open-source drivers, those restrictions would either have to be moved into hardware (expensive) or disabled (causes horrific problems with the FCC.)
We're well past the point where hardware interfaces can be described in half a dozen pages. We're well past the point where "hardware devices" even exist entirely in hardware. Most interesting hardware devices have complex interfaces that depend on functioning backend software.
Re:Better drivers and more of them (Score:4, Insightful)
You might as well say that it is illegal to make open-source FTP programs, because only closed-source FTP programs could include effective restrictions to stop them being used to download child pornography.
Re: (Score:3, Interesting)
Re: (Score:3, Interesting)
More than once, a driver update has come out that has *massively* boosted graphics card speed. I suspect that modern graphics cards are really just ultra-high-speed multicore floating-point coprocessors, and most of the scene logic happens on the CPU.
I don't know precisely what the situation is here but my understanding is that at least older geforce cards specifically implemented pretty much all of Direct3D directly on-card. The driver basically handled configuration and errata - when they fuck up the hardware, they fix it in software. The driver will be more a map of their failings than a catalog of elite code.
Re: (Score:3, Interesting)
Yes. But does that mean software that runs on a CPU on the graphics card, or software that runs on the system CPU, stealing cycles from it? The latter is what some manufacturers are doing, and should not be doing. For software that runs on the graphics card CPU, it doesn't need to run either in kernel space or user space ... that's another space we can call "hardware space". It has no access to kernel APIs or user
Re:Better drivers and more of them (Score:4, Insightful)
Seriously, why not? Do you honestly think they should be building an entire separate general-purpose CPU, and putting that on the graphics card? If they can achieve better FPS - overall FPS, including what's "stolen" from the CPU - by putting heftier more special-purpose hardware on the video card, and falling back to the CPU for the stuff the video card can't do well, why shouldn't they?
I fork over money for graphics cards because they make my games look better and play better. Fundamentally, I don't much care how they do that.
Yes, obviously, moving more stuff to the graphics card would be faster. It would also be more expensive. If there are better ways for them to use the transistors, it's fine by me. Why? You're making claims, but you're not backing them up.
Here's what I see. I see that I can go to the store and pick up a new graphics card. I can plug it into my computer and suddenly my games run significantly faster. Now, if I have a choice between Card A and Card B, and they're identical in every effective respect except that Card B makes my games run 10% faster with better shadows and uses some nasty techniques to do so that I completely don't have to care about, I'm buying Card B. There might be philosophical arguments to be made about whether Card A or Card B is better, but in all honesty, I see these philosophical arguments as similar to the whole Hurd vs. Linux debate. Okay, Hurd might be "better" - but Linux works.
What they're doing with the cards right now works. They've poured millions of man-hours into making them as fast as humanly possible within budget. If they determine that it's best to use CPU power for some things, make the GPU into a half-FPGA, and use a complex binary protocol that changes based on how the GPU is programmed, and they can make all of that stable - and my computer literally hasn't bluescreened in a year, so I'll give them that much - I think, just maybe, you should respect that they're making the right decisions for the priorities that people have. Which, generally, is game performance per dollar.
If you want to keep metaphorically extolling the virtues of Hurd because it's "better", though, I'm certainly not going to stop you.
Re: (Score:3, Insightful)
Who said anything about crippling or simplifying anything - just publish specs for the existing interface. This doesn't require opening up the secrets of how the driver works, just the interface between the driver and hardware.
Do you honestly expect nVidia to give up trade secrets in order to placate 0.1% of their market?
In keeping something secret if it
Re:Better drivers and more of them (Score:5, Interesting)
They are afraid that by providing documentation on interfaces, it may tip-off a patent holder to start looking for infringement where they might not otherwise have done so.
After all, when the prevailing legal advice is to actively not look for pre-existing patents, it is inevitable that companies will independently create infringing hardware. It's like we get the worst of both worlds - patents might as well be trade-secrets since reading them is a legal mine-field if you are working in the same area, but we also get government enforced monopolies that stifle competition.
At least the lawyers get paid for their contributions,
and that's all that should really matter in the end. Right?
Re:Better drivers and more of them (Score:5, Insightful)
No - but that isn't their argument.
Suppose you get an email from Ferrari saying their new API for their F1 car has control functions for a moveable floor.
Will that enable you to infer the entire design of their car ? - No.
No suppose Maclaren get that email. Will it affect the competition between them and Ferrari ? - quite possibly.
In both cases, I don't know enough to decide if the argument is completely valid - but both are credible.
Re: (Score:3, Interesting)
I was under the impression that Linux had less than 2% of the desktop market. Is that really enough computers to sway the decision making of hardware manufacturers?
Re: (Score:2)
It might help a bit. But for a lot of hardware they are not going to be shipping this driver for Windows. If possible they are going to ship a user mode driver to be able to claim that their hardware
Embrace, Extend, Extinguish (Score:2, Interesting)
Re: (Score:2)
These are not only free-er, but usually of better quality too.
Re: (Score:2)
I'm still waiting for a Free 3D driver for my Radeon 9800 Pro Mac Edition. (Not for much longer, though, since I'm moving to an all-OSX setup on my next computer...)
-:sigma.SB
P.S. no, the R3xx DRI code in the Xorg tree did not work. Not even accelerated 2D.
Not high performance (Score:2, Informative)
Re: (Score:3, Interesting)
Ditto for filesystem drivers, although performance matters there - you'd have to design the driver API to minimise context switching.
I don't think anyone's expecting userspace IDE or graphics drivers.
Re: (Score:3, Interesting)
USB is framed data and half duplex, while firewire (IIRC) is streamed and full duplex.
I implemented a 4 way mesh in fire wire (4 PCs each with one 4 port firewire NIC) It rocked. Now I have GigE, but still it was awesome, full non-blocking access from any PC to any PC.
-nB
Re: (Score:3, Interesting)
Re: (Score:2)
You can't have a "stable kernel api for drivers". The kernel might be super stable but since it gives kernel mode access to the drivers, the drivers can still crash the system if poorly written.
That's after all, the entire problem, and why we have userspace drivers. And why Vista has userspace drivers.
Re: (Score:2)
Yea sure, with proper type of glasses everything around you will be pink. You better do a research on why bad code running in ring 0 can always hang the system never mind the API.
Re: (Score:2)
Fo sho, or more aptly, you trust the code not cuz some smart fucker wrote it, but due to the fact you fuckin' PROVED it safe relative to yer favored semantics.
Re: (Score:2)
Seriously dude, read a book on OS design and realize how utterly wrong that statement is.
Re: (Score:3, Informative)
The problem with this is that, since modern CPUs all use untyped memory semantics, they are forced to use typed-variable semantics, rather than typed-value, making the whole system no fun at all to program (unless you're into B&D lang
Re: (Score:2)
But of course
Sorry not for MS Windows or OS X (Score:3, Insightful)
This is why I am prefer BSD license over GPL. Though, I am sure the majority of the readers on here would disagree with me. Anytime I look at open software I always check if there is a BSD licensed eq
Re: (Score:2, Informative)
This is why I am prefer people who bother to learn English grammar.
I'm not sure they have to. For example, FUSE, an API for developing a filesystem in userspace, is GPL'd in its entirety, except for the library, which is LGPL'd. There is a Mac port, and the Mac kernel part is BSD licensed -- but the rest of it is probably the same GPL'd code. There's also talk of a Windows port, though I don't see
Re: (Score:3, Insightful)
Can you give me one good reason why I should give you code for free, that you can then turn around and sell, without paying me a dime?
That's an easy one - when it's more important to you that the world use your implementation than that you get credit and/or other rewards for it.
Examples include the BSD TCP/IP stack, which was rumored to have been incorporated into Windows in, I believe, Windows 2000. It's quite believable because at this time Windows' stack became much faster and more mature, basically overnight. Vista, as you may know, has an all-new stack in which Microsoft reproduced several bugs from antiquity (Vista RC was suscept
Re: (Score:2)
Since this is GPL then neither MS or Apple would dare touch it. If it was BSD then it might be possible that Apple might adopt it but they are not going to put something into their kernel that they don't own.
You can't copyright an interface (although you can copyright the documentation of the interface. See POSIX). To make this work on a different kernel, you probably couldn't re-use much of the code anyway, so it's not much of a problem. You'd just re-write the kernel component, and share the userspace part. Since the userspace part only depends on stuff shipped with the OS, it is subject to one of the GPL exemptions. Take a look at how DRI works. You have the DRM (Direct Rendering Module) part, which i
Re: (Score:2)
Actually it doesn't. Vista includes the basic core, but to get any actually commands you have to go to the interix site and download them one by one and it takes bloody ages as there's no installer.
I tried it for a little while and went straight back to cygwin, which installs in minutes, runs a better (SFU has some really wierd interactions with the command shell.. the shell returns immediately instead of waiting for the command,
Re: (Score:3, Informative)
No, they are not.
It's happened before -- Broadcom for example. For the longest time, you could only run broadcom wireless with ndiswrapper. Now there's an open driver. You need only copy the firmware out of the Windows/OSX driver, and I imagine there might even be some free firmware developed eventually. This doesn't mean ndiswrapper is dead --
Re: (Score:2)
This may have been because the native Broadcom driver doesn't support the latest firmware (v4). I gingerly installed ndiswrapper and it just started working, and as an added bonus I can use the whizz cool Network Manager.
So the native Broadcom driv
Re: (Score:2)
Now they can write poor quality and buggy implementations against another API.
Re: (Score:2)
Re:Better drivers and more of them (Score:4, Insightful)
Re: (Score:3, Interesting)
That still doesn't preclude universal drivers. In fact, Linux can already use some Windows drivers via ndiswrapper [sourceforge.net].
I agree with the GP poster, it would be a wonderful thing for computer users, but suspect Microsoft would put VERY heavy pressure on any hardware maker who looked like participating in that sort of development.
Re:Better drivers and more of them (Score:4, Interesting)
And you also mentioned the other solution if Microsoft does make threatening noises. With both the Windows and Linux kernel driver APIs being stable, it should be trivial to make a translation wrapper between the two. MS would have their hands tied in keeping drivers off Linux if that happens as they'd have to stop their own driver development. MS needs as many good drivers as they can get for even 32-bit Vista, let alone anything 64-bit. If I were Microsoft, I'd be helping out all I could to get a stable wrapper or translation layer so that a "universal" driver for both Linux and Vista could be made by device manufacturers. Vista notoriously lacks drivers, especially Vista 64-bit, and Linux has enough to make most things work, especially for corporate machines and in server rooms. Both of those areas are ones that are much more likely to consider switching to Linux from W2K/XP than to Vista than the ordinary Joe. Or they will sit on XP like many sat on W2K until around the time XP SP2 came out. Both results would give MS no sales, and since they are also MS's most profitable markets, not upgrading to Vista would be a serious blow to MS. So I think that taking a risk that some previous 2K/XP switch to Linux because of more driver support is far outweighed by the increased number of Vista sales because of better driver support.
Re: (Score:2)
It also allows the ability for the API calls to mimic some of the windows interface calls which while different in implementation could lessen the learning curve for a company new to the linux game. It c
Full circle? (Score:5, Insightful)
Re: (Score:2)
Re:Full circle? (Score:5, Funny)
And always will be.
Re: (Score:2)
Of course, now, a lot of the people who were saying microkernels were the future are saying that type-t
Re: (Score:2)
Re: (Score:2)
Window's has a userspace driver framework as well as a FUSE equivalent (I think) so really Linux isn't going any more toward being a micro kernel than Window's is.
Re: (Score:3, Informative)
Window's has a userspace driver framework as well as a FUSE equivalent (I think)
There are two ways to make new filesystems for Windows. You can make an Installable FileSystem (IFS) driver that runs in kernelspace, and you can make a Shell Namespace Extension to the Explorer shell. There is no shell-independent way of making userspace filesystems in Windows that I know of.
Note that I'm not a Windows programmer, but a Unix one. I did look into this however, when I was thinking of making an SSHFS equivalent for Windows, so that my friends and family could access my SSH server. I never
Re: (Score:2)
But I really doubt that Linux will be pure microkernel sometimes, because...there is no need for it, _IMHO_.
Re: (Score:2)
Of course, if it's doing something really vital like managing the root FS (possible in a proper microkernel but not in Linux), you could be screwed anyway.
In any case
Re: (Score:2)
Re: (Score:2)
lol (Score:2)
In Ten Years? (Score:2)
A microkernel. What, like this [mklinux.org]? :-)
I thought I read Uberspace (Score:4, Funny)
Re: (Score:2)
Finally... (Score:4, Insightful)
My sarcasm is so extreme, I think what I said above may have actually been true.
Re: (Score:2, Insightful)
Re: (Score:2)
Re: (Score:3, Informative)
Re: (Score:2)
Considering that the major blocker for the average person in regards to making the switch to Linux happens to be driver support
no, the major blocker is "it's not windows"
You're both right. It's easy to get Windows drivers for my hardware: download, click "install". On Linux, getting updated drivers means recompiling a kernel; grandma / soccer mom can't do that.
Do you really think that "soccer moms" are going to get "updated drivers" by either method, ever? What matters to them is: does it work out of the box? Linux is better than windows in that respect (better out-of-the-box-hardware-support), but again, that doesn't matter because the mother in question will certainly buy a box with the software already installed. So what really matters is the system, software included, that is actually sold to the customer. For that, the factors I can see matter are:
Linus the pragmatist (Score:3)
Re: (Score:2)
Fortunately, for USB devices, this has existed for a while. (Indeed, there's little re
Like QNX, although not as clean (Score:4, Informative)
QNX has had user space drivers along somewhat similar lines for many years. In QNX, all the drivers are in user space, which makes for a much smaller kernel. Here's a simplified article on QNX driver writing. [embedded-c...europe.com]
The Linux approach has the problem that Linux doesn't have the message passing primitives that QNX does. So there's a special purpose mechanism to hook up these new user-space drivers to the I/O system calls. In QNX, "open", "close", "read", and "write" are actually C library functions that call MsgSend to do the work. (System V IPC isn't really suitable; it's asynchronous, which means a few extra scheduler events for every message pass when you try to use it for something that works like a subroutine call. Long story.)
Unfortunately, on x86 hardware, you can't protect the system from a user level driver and still give the driver direct hardware access. IBM VM mainframes get this right, but x86 does not. On the other hand, you can have channel drivers for the various types of x86 channels (SCSI, FireWire, USB, etc.) and make other drivers work through them.
User-level drivers cost you at least one extra memory copy of the data. That's not too bad in practice. I did a FireWire video camera driver for QNX, and when transmitting 640x480 24 bit images at 15fps, it took about 3% of a Pentium 4 CPU.
Re: (Score:3, Informative)
They impression that I get is that this is in order to use SOC's more effectively. Things like using PWM and GPIO on SOC's aren't that portable across different brands of micros. This would be an easy way for all the SOC chip makers (Freescale, Atmel, Renesas, Marvell, ect...) to create the bottom level of the driver and use the same userspace driver for embedded developers. this will still give the developers enough leway to mess with things if they need to.
I could be
High time! (Score:3, Interesting)
Vista already has this (not trolling, read on) (Score:5, Informative)
Linux has the advantage in that with Linux you can use both the old "kernel only" drivers, and the user space drivers at the same time. Vista could have done this as well, however Microsoft felt that if they allowed this to happen, then most hardware vendors would be lazy and continue to use their old kernel mode drivers, thus defeating the purpose. And to be honest, I agree with them. Linux doesn't need this on the other hand, as eventually somebody who is interested will make these kinds of changes to all of the open source drivers anyways as needed, which can't really happen because most windows drivers are binary only, so Linux can more or less take the "phased change" approach.
Disclaimer: I use both Vista and Linux (gentoo is my preferred distribution,) and am not afraid to say that I don't hate either of them, and rather like both of them.
Re: (Score:3, Informative)
Vista has partially user-space drivers for graphics, where the majority of the driver is in user space, and the kernel-mode component just allows communication between the driver and the hardware. Linux already has a similar architecture, as does MacOS X.
Second, it has user-space USB drivers. Which Linux and MacOS X have both had for ages.
It also has user-space printer drivers, which is no big deal - printer drivers hae been user-space only for years on most operating systems.
No other driv
Re:Vista already has this (not trolling, read on) (Score:5, Informative)
My understanding was that Microsoft recommended companies move to userspace not that it was required. To be fair though, I know very little about WDDM so they might have different requirements.
When I read the headline, the first thing I couldn't help but think was if the roles were reversed there would be hundreds of people saying "Good to hear you got something Linux had for a year already." Good ideas are good ideas. Why can't people just be happy when their ideas are recognized as good by others?
Re: (Score:3, Insightful)
microkernel (Score:2, Funny)
Useless API, for simple drivers only (Score:3, Informative)
Which led me to the conclusion that this patch set is worthless. It allows remapping of memory-mapped I/Os to a userspace app, and allows a thread to "wait" on an interrupt. Both are nice ideas, and it would be very easy to implement a nice serial port driver with the new APIs. (As any kernel hacker knows, serial port is one of the simplest device drivers; it's easy.)
The new API is completely useless for binary-only drivers. I/Os / IRQs are enough for extremely simple devices - these are, after all, the primitives for talking to hardware. But if this were all a driver needed, don't you think Nvidia / ATI would have used this model for shim drivers a long time ago? Simple things like DMA and PCI configuration access are not present - but to be fair, those are implementable with these primitives. Reality check: real world drivers are a lot more complicated. What is impossible is fast thread switching, kernel synchronization primitives, access to the network stack (wireless!), ring-0 CPU instructions, real-time timing access, and the huge reduction in context switches / cache flushes that comes from running within the kernel (moving code to user-mode increases latency by a factor of 3, roughly). Kiss the lag-free desktop goodbye as hard drive latency skyrockets, watch your 3D framerate drop by 70%, see your webcam stutter into unusability.
The kinds of drivers this API can support are the simplistic ones, the kind that are already GPLed and are already in the kernel, the 80% of devices in this world Linux has always had good support for. The kinds of drivers this API cannot support are 3D graphics, high-performance disk or networking, wireless networking, latency-sensitive USB or Firewire, the virtual devices (VMware, KVM, Xen, even /dev/tty) - notice that most of the devices Linux supports poorly (and all the common binary-only drivers) fall into this list.
To be fair, the official (e.g. from Linus) announcements I've seen only claim this interface is useful for embedded devices (which tend to code for a specific kernel, and not get updated). No official announcement claims the new API will help binary-only drivers. It's just the OSS-zealot crowd making unwarranted assumptions. Yes, this is the bad news: the stable userspace driver API will do nothing to solve binary-only driver dilemmas. Sorry.
Re:Useless API, for simple drivers only (Score:5, Informative)
Nice rant there. Let me summarize it:
"What is impossible in user space driver is kernel space features".
No shit. That's the point of a user-space driver. If you give a user-space app access to ring-0, it's no longer user-space. Or did you imagine there's some sort of unwet water that the stupid developers of the kernel keep missing.
The user-space driver is not set to replace all kernel mode drivers. Just like Vista, it's set to replace *some* of them, for example USB devices with low traffic. It's not a solution from heaven, it's just a reduction of fail-prone pieces that lurk in your system.
If you RTFA you probably had to read the summary as well where it's said user-space drivers aren't suitable for high-performance gear such as graphics cards.
Re: (Score:3, Interesting)
A lot of people really are missing the point here that this patch really doesn't do much for x86, but
does great things for SuperH PPC and ARM.
General or specific API? (Score:2)
About time (Score:2)
It would be great if dists would support an ABI and produce some dist neutral packaging system that allowed drivers to be installed / uninstalled easily by mere mortals no matter what dist they had.
Re: (Score:2)
No I wouldn't. That piece and other comments from Linus are talking about the kernel developer's problems supporting an ABI. But there is nothing to stop distributions and vendors from supporting an ABI and hiding any changes in implementations. Indeed, it is absolutely in their interests to support an ABI, since it makes it far, far easier to support Linux than it has been until now.
About the only way you can get a driver at the
Those that don't know Plan 9 (Score:2)
Re:Performance (Score:5, Informative)
Re: (Score:2)
Re: (Score:2)
Those are just translators that still use the in-kernel device drivers, that can use DMA.
Re: (Score:3, Insightful)
Re:Performance (Score:5, Insightful)
The most common use, I would imagine, would be as a testbed platform. Writing things directly into the kernel has many unquantifiable variables - I'm highly respectful of all who develop kernel code on a regular basis, that is no small achievement. Developing the same code in userspace with an API to link over eliminates many of the possible ways you can screw up a machine, although the code would still need to be written with an eye to being used in kernel space. For much of the writing and testing, though, you'd be in a more predictable environment.
The second-most common use would be for proprietary closed-source drivers to be written for userspace. Writing them for the kernel is problematic as the kernel internals change too much, and many such companies spend so little on maintenance that the drivers rapidly become obsolete - requiring users to either use inferior kernels or different technology, with the latter often not being possible or practical. I don't imagine older Linux drivers to be ported this way, any more than they've been maintained by the pathetic commercial vendors who pull such stunts, but newer such drivers should now be less pathetic and marginally more portable, which will be good.
Oh, wrt comments by others, Linux should absolutely never become a microkernel. Message-passing as a methodology is barely adequate for networks - RPC and CORBA are hardly famed for their elegance or performance, and when was the last time you saw Globus or MPI being used to link machines in a LAN gaming session? For that matter, STREAMS has been available for Linux since about Linux 1.2, if I recall correctly. I can't think of a single driver - even outside any of the standard or experimental trees - that uses it. I like the idea of such a patch, as I like the idea of maximum flexibility, but if it were truly useful, it would be used. It isn't.
Re: (Score:2)
Linux should absolutely never become a microkernel. Message-passing as a methodology is barely adequate for networks - RPC and CORBA are hardly famed for their elegance or performance, and when was the last time you saw Globus or MPI being used to link machines in a LAN gaming session?
Uh you realize that anything object oriented is basically equivalent to microkernel? Each object is a separate 'memory space' that only it can affect, and all interaction is through 'messages' aka method invoke + wait.
An operating system would be so much better running a safe language. I program in C every day because of some requirements, and it is so much not a good language for operating systems. Most of what an OS does is manage lots of information and access to it. C is really, really bad at both
Re: (Score:2)
Sorry, but you are wrong. On a Pentium i586, 133 MHz (my "home router") in a loop of 4096 calls of getpid() I need 192 cycles for 4086 out of 4096 loop iterations.
rdtsc ### Read Timestamp Counter
mov %eax,%ebx ## store timestamp ctr
mov $0x14,%eax ## syscall 0x14 is getpid
int $0x80 ## execute syscall
mov %eax,0xffffffe4(%ebp) ## save result
rdtsc ### Read Timestamp Counter
If you only time "rd
Linux will decouple and partition to scale (Score:2)
Religion notwithstanding, it will become microkernel-like, because a monolithic kernel just doesn't scale. It's as simple as that.
Monolithic kernels don't scale as the number of CPUs rises, nor as the number of drivers and other logical components goes up.
Because of the need to scale, in time Linux will partition itself into independent subsystems, and slowly but surely will become a microkernel-type design, because the alternative to that would be to
Re: (Score:2)
Religion notwithstanding, it will become microkernel-like, because a monolithic kernel just doesn't scale. It's as simple as that.
Nice theory. Unfortunately it seems the kernel developers that are actually working on making Linux scale to NUMA systems with O(10000) processors disagree with you: https://ols2006.108.redhat.com/2007/Reprints/lame
Re: (Score:2)
Re: (Score:2)
By that definition, Linux is already microkernel-like, with clearly defined subsystems that interact using "message passing" (function calls). Being "monolithic" does not require spaghetti code.
That depends greatly on which definition of "monolithic" o
Re: (Score:2)
Re: (Score:2)
Look at things like debian's module-assistant.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Interesting)
I know i'm hopelessy outdated and my machine shows:
martin@hope ~ $ uname -a
Linux hope 2.6.21-gentoo-r4 #1 Sat Jul 21 22:18:42 EEST 2007 i686 AMD Turion(tm) 64 Mobile Technology MT-30 AuthenticAMD GNU/Linux
Remove that gentoo notice quickly from your slashdot sig. A man using kernel 0.0.02 versions old is a stable version pimp not a gentoo roller...
As for the article
Userspace drivers are not really a new groundbreaking idea now are they
Re: (Score:2)
What about unstable open source kernel drivers?
-:sigma.SB (who went through over 60 reboots trying to get non-crashing 3D on his iBook's Rage 128 before finally giving up)