:>     The network stack is equally easy to make MP-safe.  In this case we
:>     have a shared lock to lookup sockets for host/port combinations and
:>     then fine-grained exclusive locks within those sockets.  Route table
:>     and other high level operations could in fact remain BGL'd without
:>     interfering with the network stack because the network stack *already*
:>     caches route table lookups.
:> 
:
:       might it be fair to summarize this as: you locks on data
:rather than locks on code.
:
:jmb

    In a nutshell, yes.   Functional data structure locking such that
    things don't trip over each other with a typical heavy load.

    For example, it may well be that it makes more sense to lock hash
    table chains rather then the structures stored on those chains
    in some instances.  vm_page_lookup(), for example, and tsleep().

    In other cases it may make sense to lock the terminal structures.
    For example: vnodes, processes, pmaps, VM objects.

    And in still other cases we should be able to get away with no
    locking at all (in the steady-state heavy load case).  Network 
    interrupts, for example, can queue packets with fixed-length 
    bidirectional FIFOs.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to