From owner-freebsd-current Mon Nov 25 10: 2:37 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 616EB37B401; Mon, 25 Nov 2002 10:02:36 -0800 (PST) Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CE7E43E9C; Mon, 25 Nov 2002 10:02:35 -0800 (PST) (envelope-from bmilekic@unixdaemons.com) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id gAPI1Ph75296; Mon, 25 Nov 2002 13:01:25 -0500 (EST) (envelope-from bmilekic@unixdaemons.com) Date: Mon, 25 Nov 2002 13:01:25 -0500 From: Bosko Milekic To: Julian Elischer Cc: Andrew Gallatin , Robert Watson , Luigi Rizzo , current@freebsd.org Subject: Re: mbuf header bloat ? Message-ID: <20021125130125.B75177@unixdaemons.com> References: <15841.17237.826666.653505@grasshopper.cs.duke.edu> 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 Sun, Nov 24, 2002 at 01:33:29PM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Nov 24, 2002 at 01:33:29PM -0800, Julian Elischer wrote: > > > On Sun, 24 Nov 2002, Andrew Gallatin wrote: > > > > > If we're going to nitpick the mbuf system, a much, much worse problem > > is that you cannot allocate an mbuf chain w/o holding Giant, which > > stems from the mbuf system eventually calling kmem_malloc(). This > > effectively prevents any network driver from being giant-free. When > > mbufs are low, mb_alloc() calls mb_pop_cont(). This, in turn, calls > > kmem_malloc() which requires Giant... > > > > The mbuf system calls malloc in other ways too. The first time you > > use a cluster, m_ext.ext_ref_cnt is malloc()'ed, and malloc is called > > when the mbuf map is expanded... I assume malloc will eventually > > call kmem_malloc(), leading to the same locking problems. > > > > I know that both tru64 and aix just malloc their mbufs. > > I think we tied that and went back to a separate allocator, but I have > no idea why.. maybe someone else can enlighten me.. As I mentionned in a previous Email, it all has to do with what were considered to be the requirements of network buffer allocations and optimisations in that respect. -- Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message