From owner-freebsd-net Sat Jun 29 18:50: 9 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 49BB837B400 for ; Sat, 29 Jun 2002 18:50:06 -0700 (PDT) Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B07343E09 for ; Sat, 29 Jun 2002 18:50:06 -0700 (PDT) (envelope-from hsu@FreeBSD.org) Received: from FreeBSD.org ([63.193.112.125]) by mta7.pltn13.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GYH00JFHX3HKD@mta7.pltn13.pbi.net> for net@freebsd.org; Sat, 29 Jun 2002 18:50:05 -0700 (PDT) Date: Sat, 29 Jun 2002 18:50:24 -0700 From: Jeffrey Hsu Subject: Re: Should we keep a cache of mbuf+cluster ready for use ? In-reply-to: "Your message of Sat, 29 Jun 2002 19:08:44 EDT." <20020629190844.A54115@unixdaemons.com> To: Bosko Milekic Cc: net@freebsd.org Message-id: <0GYH00JFIX3HKD@mta7.pltn13.pbi.net> MIME-version: 1.0 X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT 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 > > So, what you want is something like a > > MGETHCL(m, how, type) > > MHCLFREE(m) > > interface which first looks in a combined freelist before the individual > > mbuf and cluster freelists. I think it's a good idea. > > I would prefer to see an interface that just grabs both a cluster and > an mbuf from their respective per-CPU caches (in -CURRENT) while only > grabbing the lock once, if at all this is that important to you. [*] What would this interface look like? It seems to me having a grouped allocate and free interface allows for a variety of implementations: either the -stable sample implementation Luigi posted, a uma-based one in -current, or a modification of the -current mbuf allocator. The gains from each implementation may vary, but is no worse than doing the two allocations separately and returning them as a group. Jeffrey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message