From owner-freebsd-net Thu Jul 11 19:27:43 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7100937B400 for ; Thu, 11 Jul 2002 19:27:41 -0700 (PDT) Received: from angelica.unixdaemons.com (angelica.unixdaemons.com [209.148.64.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5E9543E42 for ; Thu, 11 Jul 2002 19:27:40 -0700 (PDT) (envelope-from bmilekic@angelica.unixdaemons.com) Received: from angelica.unixdaemons.com (bmilekic@localhost.unixdaemons.com [127.0.0.1]) by angelica.unixdaemons.com (8.12.5/8.12.1) with ESMTP id g6C2RS6M006908; Thu, 11 Jul 2002 22:27:28 -0400 (EDT) X-Authentication-Warning: angelica.unixdaemons.com: Host bmilekic@localhost.unixdaemons.com [127.0.0.1] claimed to be angelica.unixdaemons.com Received: (from bmilekic@localhost) by angelica.unixdaemons.com (8.12.5/8.12.1/Submit) id g6C2RPmO006906; Thu, 11 Jul 2002 22:27:25 -0400 (EDT) (envelope-from bmilekic) Date: Thu, 11 Jul 2002 22:27:25 -0400 From: Bosko Milekic To: Julian Elischer Cc: Luigi Rizzo , freebsd-net@FreeBSD.ORG Subject: Re: mbuf external buffer reference counters Message-ID: <20020711222725.A5284@unixdaemons.com> References: <20020711171255.A19014@unixdaemons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from julian@elischer.org on Thu, Jul 11, 2002 at 04:10:32PM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Jul 11, 2002 at 04:10:32PM -0700, Julian Elischer wrote: > Don't forget that "external" does not neccesarily mean "cluster". > I still consider the method used in (hmm was it NetBSD or OSF/1?) > to be very good.. > > 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. Regards, -- Bosko Milekic bmilekic@unixdaemons.com bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message