From owner-freebsd-net Thu Jul 11 13:56:13 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 13C5737B400 for ; Thu, 11 Jul 2002 13:56:10 -0700 (PDT) Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BA4E43E5E for ; Thu, 11 Jul 2002 13:56:09 -0700 (PDT) (envelope-from rizzo@iguana.icir.org) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g6BKu8532619; Thu, 11 Jul 2002 13:56:08 -0700 (PDT) (envelope-from rizzo) Date: Thu, 11 Jul 2002 13:56:08 -0700 From: Luigi Rizzo To: Bosko Milekic Cc: freebsd-net@FreeBSD.ORG Subject: Re: mbuf external buffer reference counters Message-ID: <20020711135608.A32460@iguana.icir.org> References: <20020711162026.A18717@unixdaemons.com> <20020711133802.A31827@iguana.icir.org> <20020711164225.A18852@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: <20020711164225.A18852@unixdaemons.com>; from bmilekic@unixdaemons.com on Thu, Jul 11, 2002 at 04:42:25PM -0400 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:42:25PM -0400, Bosko Milekic wrote: ... > > and trimming away the refcount area might easily result in suboptimal > > allocation of storage within the kernel. > > Can you elaborate on the sub-optimal performance comment with, > perhaps, an example? I'm sorry but I'm sometimes slow to understand example: userland does an 8KB write, in the old case this requires 4 clusters, with the new one you end up using 4 clusters and stuff the remaining 16 bytes in a regular mbuf, then depending on the relative producer-consumer speed the next write will try to fill the mbuf and attach a new cluster, and so on... and when TCP hits these data-in-mbuf blocks will have to copy rather than reference the data blocks... Maybe it is irrelevant for performance, maybe it is not, i am not sure. > The problem with this approach is that I'm probably going to be > allocating jumbo bufs from the same map, in which case you would have > huge `gaps' in your address <-> ref. count location map and, as a how huge ? and do you really need to use the same map rather than two different ones ? cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message