Bosko Milekic writes:
> > mbufs that referred to the same object were linked together.
> > I forget the details exactly.  maybe someone else can remember..
> > it did it without ref counts somehow..
> 
>  Yes, this is in NetBSD still and it is very elegant.  I remember
>  looking at this a long time ago but to be honest, the reason I didn't
>  implement it then first escaped me.  However, thanks to David Malone's
>  awesome commit messages, I found it:
> 
>  rev 1.53 of sys/sys/mbuf.h, extract:
> [...]
>  "NetBSD's system of linked lists of mbufs was cosidered, but Alfred
>  felt it would have locking issues when the kernel was made more
>  SMP friendly."
> [...]
> 
>  I think it's almost clear now that there are, in fact, no SMP issues
>  with it (we don't do per-cluster locking, or anything ridiculous like
>  that), so unless Alfred has the reason again, I'll consider that method
>  again instead.  Thanks for the constructive feedback.

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.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to