Re: Can we move device drivers into user-space?

From: Valdis . Kletnieks
Date: Fri Feb 24 2012 - 10:58:09 EST


On Fri, 24 Feb 2012 10:19:36 EST, Jidong Xiao said:

> Actually, my major concern is, since UIO has been accepted, then why
> don't we move all the rest device drivers into user space as well. As
> I understand, currently, some of device drivers are running on user
> space, while the other (or say the majority of) device drivers are
> running on kernel space, so why don't we maintain a consistent device
> drivers infrastructure, say, either all in user space, or all in
> kernel space. (Sure some critical device drivers still need to be kept
> in kernel space.)

Sure we could do that, if you deal with all of the following issues:
1) All I/O would take a lot more CPU, due to the additional context switching
that would be required to start an I/O and handle the completion interrupt.
2) It makes it a lot harder to do zero-copy I/O.
3) Once we push the API to userspace, we're stuck with it. See
Documentation/stable_api_nonsense.txt for the details.

And finally:

4) -ENOPATCH. You think it's a good idea, do up a patch that works at
least as well as what we have now...

Attachment: pgp00000.pgp
Description: PGP signature