Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2000 01:36:48 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "Jonathan M. Bresler" <jmb@hub.freebsd.org>
Cc:        smp@csn.net, current@FreeBSD.ORG
Subject:   Re: SMP changes and breaking kld object module compatibility
Message-ID:  <200004250836.BAA76099@apollo.backplane.com>
References:   <20000425014539.D944E37B7A0@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

:>     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 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004250836.BAA76099>