DragonFly kernel List (threaded) for 2007-01
DragonFly BSD
DragonFly kernel List (threaded) for 2007-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: VKernel progress update - 8 Jan 2006 (milestone reached!)

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Jan 2007 19:53:40 -0800 (PST)

:Matthew Dillon wrote:
:>     The old addage, "First make it work, then make it fast", applies big
:>     time here.  So I'd say use coarse polling for now.
:two thoughts:
:how about using O_ASYNC and SIGIO for console and network, etc?
:we could build a device tree (starting with a nexus), where drivers could register filedescs as "interrupt" resources.  or something like that...
:  simon

    It would work, but it wouldn't be fun.  Signals are very expensive.  Very
    very expensive.

    Kqueue or select for the network would work, the provisio being that 
    I would need to create some sort of mechanism to break out of an
    emulated user context based on a kqueue event occuring.  I don't think
    that would be too hard to do.

    The disk driver is a different matter.  There isn't even a SIGIO 
    mechanism available for reading and writing files.  In fact, two things
    need to be done on the disk driver front:  First, we need to use 
    direct I/O so the data doesn't get double cached (once by the virtual
    kernel and once by the real kernel).  Second, we need some sort of 
    pseudo-DMA to handle the transfer... maybe a kernel thread.  We have
    the advantage that the transfers to and from the disk only occur
    from the virtual kernel's 'memory' (which itself is just a memory mapped
    file), so it would be fairly easy to write a real-kernel kernel thread
    to help out there.

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]