Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2000 01:55:51 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Chuck Paterson <cp@bsdi.com>
Cc:        smp@FreeBSD.ORG
Subject:   Re: Netgraph locking primatives. take 1.
Message-ID:  <3A3F30A6.6C24C308@elischer.org>
References:  <200012190002.eBJ02CP25038@berserker.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Paterson wrote:
> 
> Ah, now I understand.
> 
> Do you have a master lock to keep messages from queueing on the
> write lock just as you are destroying the node?
> 
> Chuck
basically..
we have an INVALID bit that is set before removing it,
and after setting the INVALID  we remove all references 
to the queue (so nothing can find it)
That may take a while becasue it requires the removal of hooks 
from neighbouring nodes, and is achieved by setign a hook-destroy 
message on the neighbouring node's input queues, (and leaving).
When the reference count to the hooks go to 0, they are removed.
When the last hook is removed, the queue is locked and flushed.
At this stage nothign can find us to use us except us.
so we can safely remove the node, the queue etc.


-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000
---> X_.---._/  presently in:  Budapest
            v


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A3F30A6.6C24C308>