Linux.conf.au 2003 | Abstracts

The Linux Kernel Device Model

Patrick Mochel

BiographyBioPaperPaper AudioAudio

The Linux kernel is getting a makeover during the 2.5 development series concerning the way it represents devices and drivers. The device model is a refinement of kernel data structures and a unification of the mechanisms to operate on these structures.

Through this unification, an incredible amount of code cleanup is possible. Duplicate data structures and interfaces can be consolidated into common code in the device model core. Global interfaces for devices and types of devices can be created to do once near-impossible things, like system-wide power management.

In fact, many complex problems are greatly reduced in size as a direct result of the device model. Besides power management, operations like persistant device attribute restoration and userspace-driven device naming policy can be implemented cleanly and efficiently.

Further, by creating common data strucutres throughout driver subsystems, these objects and the linkage between them is easily represented in userspace via driverfs. Attributes of devices and drivers can be easily exported in driverfs. This interface is designed to enforce a simple, one-value-per-file ASCII interface, and eliminate to need to implement buggy formatting and copying code in drivers.

The goal of this paper is to describe the attribute of the device model, including:

  • The data structures describing the objects
  • The interfaces exposing them to the rest of the kernel
  • Driverfs and userspace representation of object attributes
  • Applications of the model, and the resolution of complex problems
  • How it will achieve world peace

The presentation will discuss the concepts in the paper, as well as temporal topics, including the current progress of the implementation, what is next on the agenda, and what is needed from developers.


The original Tux penguin is copyright by Larry Ewing.
Linux is a trademark of Linus Torvalds.
© 2002 Linux Australia.