Stories
Slash Boxes
Comments

SoylentNews is people

posted by cmn32480 on Sunday November 15 2015, @06:46PM   Printer-friendly

Device drivers commonly execute in the kernel to achieve high performance and easy access to kernel services. However, this comes at the price of decreased reliability and increased programming difficulty. Driver programmers are unable to use user-mode development tools and must instead use cumbersome kernel tools. Faults in kernel drivers can cause the entire operating system to crash. User-mode drivers have long been seen as a solution to this problem, but suffer from either poor performance or new interfaces that require a rewrite of existing drivers.

This paper introduces the Microdrivers architecture that achieves high performance and compatibility by leaving critical path code in the kernel and moving the rest of the driver code to a user-mode process. This allows data-handling operations critical to I/O performance to run at full speed, while management operations such as initialization and configuration run at reduced speed in user-level. To achieve compatibility, we present DriverSlicer, a tool that splits existing kernel drivers into a kernel-level component and a user-level component using a small number of programmer annotations. Experiments show that as much as 65% of driver code can be removed from the kernel without affecting common-case performance, and that only 1-6 percent of the code requires annotations.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Insightful) by Gravis on Sunday November 15 2015, @07:43PM

    by Gravis (4596) on Sunday November 15 2015, @07:43PM (#263730)

    if you are using a user space driver then it's unlikely to be anything critical therefore speed is beside the point. if you need speed, write a damn kernel driver! if your code is too unwieldy/flawed to put in the kernel then you have an entirely different problem.

    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2, Interesting) by TheRaven on Sunday November 15 2015, @08:57PM

    by TheRaven (270) on Sunday November 15 2015, @08:57PM (#263756) Journal
    Nonsense. For high-performance networking, kernel bypass is the buzzword of the day. Modern GPU drivers do memory allocation and IOMMU setup in the kernel and then do everything else entirely in userspace to achieve maximum performance. If you want to go fast, you don't want the kernel in the way, and you don't want a load of generic abstractions. You want the hardware to do virtualisation and you want userspace (you know, the place that's doing the work that needs to come from or go to the device lives) to talk directly to the hardware without the OS doing anything that isn't absolutely necessary for maintaining integrity. Even older DRI/DRM drivers (from 10+ years ago) had a similar separation: the kernel validates that the command stream isn't sending DMA requests anywhere other than the userspace program's mapped regions, but otherwise just passes the commands directly to the hardware.

    Oh, and for anyone not paying attention, TFA is a paper from ASPLOS 2008: it's probably getting close to deserving a test-of-time award in the next couple of years, because it's fairly accurately predicted what everyone is is doing now, for places where performance matters.

    --
    sudo mod me up
    • (Score: 1, Troll) by Gravis on Sunday November 15 2015, @09:34PM

      by Gravis (4596) on Sunday November 15 2015, @09:34PM (#263765)

      Modern GPU drivers do memory allocation and IOMMU setup in the kernel and then do everything else entirely in userspace to achieve maximum performance.

      so basically they act as interfaces to the hardware? isn't that the definition of a driver?

      If you want to go fast, you don't want the kernel in the way

      LOL! right because the kernel is so restrictive, eh? xD

      not bothering with the rest of your message because what you wrote indicates you are out of your depth.

      • (Score: 3, Interesting) by TheRaven on Monday November 16 2015, @06:08PM

        by TheRaven (270) on Monday November 16 2015, @06:08PM (#264040) Journal

        so basically they act as interfaces to the hardware? isn't that the definition of a driver?

        No, that's not the usual definition. Drivers are both interfaces and abstractions. A SATA disk driver doesn't just give a SATA command queue to the rest of the system, it exposes something that stores and retrieves blocks (and provides other functionality) and exposes an interface to the next layer in the stack that's the same as SAS or other disk interfaces.

        LOL! right because the kernel is so restrictive, eh? xD

        Yes, the kernel provides a load of abstraction that handles the generic case well. It abstracts all of the network transport specific details behind the socket interface, for example. That's great if you want code that doesn't have to care about these things, but if you want code that runs a subset of UDP or TCP really fast then having that code all get out of the way and let you push packets into the device rings directly is going to be a lot faster.

        not bothering with the rest of your message because what you wrote indicates you are out of your depth.

        Don't read my message then, go and look at how modern GPU drivers work (I've worked on some in the past) or read some of the recent SOSP papers. For example, compare the performance of Namestorm to BIND and then look at why Namestorm is faster (read the paper).

        Or, you know, argue with some real examples. I can back up everything that I've said with shipping code in production systems and with papers in top-tier operating system venues. You can back up what you've said with... what exactly?

        --
        sudo mod me up