The University of New South Wales

Linux kernel infrastructure for user-level device drivers


Peter Chubb

    School of Computer Science and Engineering
    Sydney 2052, Australia


Infrastructure for User-Level Device Drivers in Linux 2.5. (Kernel/Low Level) Presented by Dr Peter Chubb in Napier LG29 on Thursday, January 15th at 2:00pm

Linux 2.5.x has good support now for user-mode device drivers --- XFree being the biggest and most obvious --- but also there is support for user-mode input devices and for devices that hang off the parallel port.

The motivations for user-mode device drivers are many:

There are however some drawbacks, the main ones being performance and security.

Three recent developments have made it possible to implement an infrastructure for user-level device drivers that perform almost as well (in some cases better than) in-kernel device drivers. These are the new pthreads library (and corresponding kernel changes: futexes, faster clone and exit, etc); fast system call support; and IOMMUs.

Now that many high-end machines have an IOMMU, it becomes possible, at least in theory, to provide secure access to DMA to user processes.

Fast system calls allow the kernel<->user corssing to be extremely cheap, making user-process interrupt handling feasible.

And fast context-switching and IPC for posix threads, means that multithreaded device drivers can have the kind of performance that until recently was only available in-kernel.

In my paper and talk I shall describe the infrastructure necessary to provide low-latency access to interrupts and DMA from a user process. I shall also present some benchmarks for an IDE controller that show essentially the same I/O performance as the in-kernel driver, at the expense of slightly increased processor utilisation.

BibTeX Entry

    month            = jan,
    paperurl         = {},
    booktitle        = {5th},
    author           = {Peter Chubb},
    year             = {2004},
    title            = {Linux Kernel Infrastructure for User-Level Device Drivers},
    address          = {Adelaide, Australia}