From owner-freebsd-net@FreeBSD.ORG Fri Apr 30 15:15:05 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12CCE106566B for ; Fri, 30 Apr 2010 15:15:05 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (gateway.netasq.com [91.212.116.2]) by mx1.freebsd.org (Postfix) with ESMTP id D1F988FC0A for ; Fri, 30 Apr 2010 15:15:03 +0000 (UTC) Received: from [10.2.1.5] (unknown [10.2.1.5]) by work.netasq.com (Postfix) with ESMTPSA id E74E6740003 for ; Fri, 30 Apr 2010 17:14:57 +0200 (CEST) From: Fabien Thomas Content-Type: text/plain; charset=us-ascii Message-Id: Date: Fri, 30 Apr 2010 17:15:02 +0200 To: FreeBSD Net Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) Subject: m_getjcl and packet zone X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fabient@freebsd.org List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2010 15:15:05 -0000 Hi all, While doing some 10Gb benchmark i've found that m_getjcl does not = benefit from the packet zone. There is a ~ 80% increase in FPS when applying the following patch. 256B frame driver to driver / stable_8: - 3 765 066 FPS - 6 868 153 FPS with the patch applied. Is there a good reason to not commit this ? Fabien diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 158edb4..95a44a4 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -523,6 +523,9 @@ m_getjcl(int how, short type, int flags, int size) struct mbuf *m, *n; uma_zone_t zone; + if (size =3D=3D MCLBYTES) + return m_getcl(how, type, flags); + args.flags =3D flags; args.type =3D type;