From owner-freebsd-net@FreeBSD.ORG Mon Feb 2 07:55:35 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07EBC106564A for ; Mon, 2 Feb 2009 07:55:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outM.internet-mail-service.net (outm.internet-mail-service.net [216.240.47.236]) by mx1.freebsd.org (Postfix) with ESMTP id E17F38FC0C for ; Mon, 2 Feb 2009 07:55:32 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id CB5DE249C; Sun, 1 Feb 2009 23:55:32 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 51F972D6043; Sun, 1 Feb 2009 23:55:31 -0800 (PST) Message-ID: <4986A6F7.7080402@elischer.org> Date: Sun, 01 Feb 2009 23:55:35 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Jeff Roberson References: <20090131125100.N983@desktop> In-Reply-To: <20090131125100.N983@desktop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: mbuf revision, testers/comments wanted. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 07:55:35 -0000 Jeff Roberson wrote: > http://people.freebsd.org/~jeff/mbuf_ref2.diff > > Hello, > > I have been experimenting with different revisions to the mbuf api to > improve performance and simplify code. This patch is the first of > several proposed steps towards those goals. The aim of this patch is > two fold; > > 1) Revising the reference counting system so that we can eliminate > reference uma zones and the significant uma_find_refcnt() costs in some > workloads. This is done by making all mbufs reference counted and using > the owning mbuf's ref for the ext_ref. In this model we never reference > data, we only reference other mbufs owning the data. > > 2) Improve allocation and free performance by reducing the special > cases in the format and using inlines when appropriate. In particular, > the simplification of the m_ext structure yields less code and confusion > for dealing with external storage on free. The ctor/dtor mbuf routines > are no longer used. A zone pointer and length was added to struct mbuf > to simplify free and size calculations. > > A number of routines were made much, much simpler by the addition of a > 16bit size field. Previously we dependend on calculating the size by > figuring out if it was an ext, pkthdr, or standard mbuf. Ultimately, > this patch moves us closer to having a size agnostic mbuf which we can > use to experiment with different allocation sizes or even backending to > malloc for dynamically sized mbufs. > > I would appreciate testing feedback from varied workloads to make sure > there are no bugs before I go forward with this. I have tested only > host oriented networking with a few drivers. It is not anticipated that > there will be any significant incompatibilities introduced with this > round but there is always that possibility. > generally I like it. We discussed someof this before.. It would be nice if you added more comments than you stripped out I personally think that some descriptions of what you are doing would be great in teh comments. ascii art too if needed... Also some diagrams in any form you want would be nice.. all that about 1000 words and a picture is true. > Thanks, > Jeff > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"