From owner-freebsd-net@FreeBSD.ORG Mon Feb 2 19:46:22 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 65F0B1065673 for ; Mon, 2 Feb 2009 19:46:22 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 2757B8FC1A for ; Mon, 2 Feb 2009 19:46:21 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: by an-out-0708.google.com with SMTP id b38so698445ana.13 for ; Mon, 02 Feb 2009 11:46:21 -0800 (PST) Received: by 10.65.212.18 with SMTP id o18mr2832488qbq.21.1233603981147; Mon, 02 Feb 2009 11:46:21 -0800 (PST) Received: from ?10.0.1.199? ([72.14.241.160]) by mx.google.com with ESMTPS id p31sm5834738qbp.18.2009.02.02.11.46.18 (version=SSLv3 cipher=RC4-MD5); Mon, 02 Feb 2009 11:46:20 -0800 (PST) Date: Mon, 2 Feb 2009 09:44:32 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Julian Elischer In-Reply-To: <4986A6F7.7080402@elischer.org> Message-ID: <20090202094307.O983@desktop> References: <20090131125100.N983@desktop> <4986A6F7.7080402@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 19:46:24 -0000 On Sun, 1 Feb 2009, Julian Elischer wrote: > 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. Yes, I can do that. I hadn't added as much because things are still a bit in flux. > > 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. I'll have to see about that. Any suggestions similar to visio for unix? I guess graphviz can also do datastructure diagrams but I have not used it for this before. I'll check it out but if you have other suggestions it's welcome. Thanks, Jeff > >> 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" >