Trustworthy Systems

Linux kernel infrastructure for user-level device drivers

Authors

Peter Chubb

    School of Computer Science and Engineering
    UNSW,
    Sydney 2052, Australia

Abstract

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

  @inproceedings{Chubb_04,
    address          = {Adelaide, Australia},
    author           = {Peter Chubb},
    booktitle        = {Linux.conf.au},
    month            = jan,
    paperurl         = {https://trustworthy.systems/publications/papers/Chubb_04.pdf},
    title            = {Linux Kernel Infrastructure for User-Level Device Drivers},
    year             = {2004}
  }

Download