2002 Linux Symposium
navigation



related

contact:

relayfs: An efficient unified approach for trasmitting data from kernel to user space

Karim Yaghmour

Linux currently has several mechanisms for relaying information about the system and applications to the user. Some examples include printk and other syslog events, evlog, ltt, oprofile, etc. Each subsystem has its own method for relaying information from the kernel to user space. Some of these mechanisms have difficulties, e.g., printks get lost. In addition to selected difficulties, the replication of code and maintenance is undesirable. In this paper we describe relayfs, a high-speed data relay filesystem, that addresses the needs of the above subsystems while providing a unified, efficient, and reliable relay mechanism. relayfs allows subsystems to log data efficiently and safely using lockless technology that is designed to scale well across multiprocessor systems. relayfs includes the flexibility to be expanded should other subsystems need additional services, but has a simple design intended to meet the needs of currently available subsystems. In this paper we discuss the architecture, implementation, and usage of relayfs. relayfs uses channels that allow data to be directed to a suitable buffer or buffers for the subsystems that allocated the channel. We describe the kernel API and file naming conventions, address init-time issues, and discuss performance tradeoffs available using relayfs. Finally, via example, we demonstrate how existing subsystems use relayfs to log their data.
2004
© 1999-2003 Linux Symposium.  All Rights Reserved.