wakeup idea...

Matthew Dillon dillon at apollo.backplane.com
Mon Mar 6 11:39:14 PST 2006


    I've tried many variations of the idea of passing a real structure
    to sleep/wakeup and eventually gave up on trying to change the API.
    It is just too useful to be able to pass an arbitrary 'id' as a the
    rendezvous point.

    But, what I *did* do was implement scheduling primitives that 
    sleep/wakeup uses to do the actual descheduling and rescheduling of
    the kernel thread, and there are a number of mechanisms in DragonFly
    which use those primitives directly rather then using sleep/wakeup.
    In particular, the interrupt thread procedure, softclock thread,
    and DragonFly's LWKT messaging subsystem (e.g. lwkt_default_waitport()).

    So what I would recommend is that the sleep/wakeup API *NOT* be changed,
    but instead you simplify the lower level APIs that sleep/wakeup uses
    to the point where other high performance APIs in the system, such as
    lockmgr, can call them directly without making a mess.

						-Matt



More information about the freebsd-arch mailing list