From owner-freebsd-current Tue Apr 25 1:36:53 2000 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id C327137BCA6; Tue, 25 Apr 2000 01:36:49 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id BAA76099; Tue, 25 Apr 2000 01:36:48 -0700 (PDT) (envelope-from dillon) Date: Tue, 25 Apr 2000 01:36:48 -0700 (PDT) From: Matthew Dillon Message-Id: <200004250836.BAA76099@apollo.backplane.com> To: "Jonathan M. Bresler" Cc: smp@csn.net, current@FreeBSD.ORG Subject: Re: SMP changes and breaking kld object module compatibility References: <20000425014539.D944E37B7A0@hub.freebsd.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message