Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Oct 2004 18:19:10 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Max Laier <max@love2party.net>
Subject:   Re: cvs commit: src/sys/sys protosw.h src/sys/kern uipc_domain.cuipc_socket2.c
Message-ID:  <Pine.NEB.3.96L.1041019181643.81058G-100000@fledge.watson.org>
In-Reply-To: <41759110.6010005@elischer.org>

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

On Tue, 19 Oct 2004, Julian Elischer wrote:

> >>Another point: If you really want to keep the possibility to remove a
> >>protocol, you have to introduce some busy counter that pervents removal while
> >>the kernel is inside a protocol function. This has to be handled by the
> >>protocol itself, but it has to be taken care of somehow.
> 
> each protocol array entry could have either a mutex or a refcount or
> both.. 

The trick here is to get just enough synchronization to not break, but not
enough to hurt.  That's one of the reasons why I feel like the heavier
weight approaches taken elsewhere may not be appropriate here.  I guess no
one is talking about loading UDP, but at the same time if we're going to
have generic loadable protocol support, it would be nice to get a pretty
clean API that would meet the requirements of higher volume protocols.  As
I mentioned in a previous e-mail, it might almost be desirable to say "no
unloading" and simply avoid the hard problems, since atomic add is easy
whereas atomic remove is hard.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Principal Research Scientist, McAfee Research




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1041019181643.81058G-100000>