Date: Sun, 17 Dec 2000 13:11:42 -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: <3A3D2C0E.B339AB94@elischer.org> References: <200012172004.eBHK4BP14873@berserker.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Chuck Paterson wrote: > > Julian > Unlike in you example program you probably want to make it > explicity illegal to request a write lock while holding a reader > lock, otherwise you have to deal with the multiple reader upgrade > deadlock problem. > > Chuck thanks for the review! Can you explain a bit more clearly to me (I'm not locking expert) what "THE" multiple reader upgrade deadlock problem actually is? It is possible it doesn't apply to netgraph, or it may be that there are some netgraph specific workarounds. Remember, in netgraph all interaction occurs with messages, and in this case a 'write' request is really a message that asks a netgraph node to do something that would be tricky in the case where there are packets being processed within the node. e.g. remove node.. ...disconnect from ajoiining node, etc. All the writer is doing is ensuring that all processing currently using th enode be allowed to drain before it is allowed to 'do it's thing'. One thing that I have not mentionned in this example is the system by which Netgraph marks links and nodes as invalid before removing them, so that traffic can drain. There will be some behind the scenes (who's that behind the curtain?) stuff where for example, removing a link between two nodes requires that you hold BOTH nodes. however I don't see this as a problem at this time. -- __--_|\ 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?3A3D2C0E.B339AB94>