Date: Fri, 12 Jul 2002 04:26:53 -0700 From: Jon Mini <baka@elvis.mu.org> To: Alfred Perlstein <bright@mu.org> Cc: Archie Cobbs <archie@dellroad.org>, Bosko Milekic <bmilekic@unixdaemons.com>, Julian Elischer <julian@elischer.org>, Luigi Rizzo <rizzo@icir.org>, freebsd-net@FreeBSD.ORG Subject: Re: mbuf external buffer reference counters Message-ID: <20020712112653.GS55378@elvis.mu.org> In-Reply-To: <20020712064104.GG97638@elvis.mu.org> References: <20020711222725.A5284@unixdaemons.com> <200207120519.g6C5JoH36140@arch20m.dellroad.org> <20020712064104.GG97638@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 11, 2002 at 11:41:04PM -0700, Alfred Perlstein wrote: > > That's a cool idea.. haven't looked at NetBSD but am imagining the > > mbufs would be linked in a 'ring'. This works because you never > > care how many references are, just whether there's one or more than > > one, and this is easy to tell by examining the ring pointer. > > I.e., you never have to iterate through the entire ring. > > That's true, but could someone explain how one can safely and > effeciently manipulate such a structure in an SMP environment? > > I'm not saying it's impossible, I'm just saying it didn't seem > intuative to me back then, as well as now. I'm probably speaking out of turn here (I have no idea what structure you all are talking about), but a monodirectional ring can be safely modified with a compare-and-exchange atomic operation. -- Jonathan Mini <mini@freebsd.org> http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020712112653.GS55378>