by codemac · 14y ago · 0 comments
The I/O MMU!
Write your drivers in userspace, save your sanity. I realize it's hard to get a kernel that supports everything you need to accomplish this, but it's definitely "the future" when it comes to device drivers.
However, this is a decent beginning point for people completely unfamiliar with writing a driver. The table and the makefile parts are especially important for beginners to just get freaking started.
You can write fast network card drivers in userspace too. You map the physical DMA memory into userspace and cut out the kernel entirely. Interrupts don't even come into the picture when you're polling several packets per microsecond. Lots of those cards nowadays come with high-end packet I/O libraries that are implemented in userspace. Myricom Sniffer10G, Intel Data Plane Development Kit, ntop.org DNA, etc.
The I/O MMU can be slightly slower than "true" DMA if done poorly, but the simple use case is actually performs the best (in my teeny experience).