From owner-cvs-src@FreeBSD.ORG Thu Feb 15 10:33:49 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B95AA16A400; Thu, 15 Feb 2007 10:33:49 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id AB7A413C467; Thu, 15 Feb 2007 10:33:49 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1FAXnQ1023079; Thu, 15 Feb 2007 10:33:49 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1FAXnJ1023078; Thu, 15 Feb 2007 10:33:49 GMT (envelope-from bde) Message-Id: <200702151033.l1FAXnJ1023078@repoman.freebsd.org> From: Bruce Evans Date: Thu, 15 Feb 2007 10:33:49 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_4 Cc: Subject: cvs commit: src/sys/dev/bge if_bge.c if_bgereg.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2007 10:33:49 -0000 bde 2007-02-15 10:33:49 UTC FreeBSD src repository Modified files: (Branch: RELENG_4) sys/dev/bge if_bge.c if_bgereg.h Log: MFC (if_bge.c 1.108, etc., less some style bugs: eliminate one PCI read per call to bge_start()). In packet blasting tests using ttcp with tiny udp packets on an A64-3200 with a 64-bit 5701 on a 32-bit 33MHz PCI bus, this gives a speedup from 347 kpps to 623 kpps. sendto() has a lot of software overheads, but even with these the single PCI write per call to bge_start() almost doubled the per-packet time. This is partly because the software overheads are so large that the CPU can't keep up with a Gbps NIC that can actually get anywhere near Gbps speed for tiny packets (347 kppps for tiny packets is only about 21% of wire speed). When the CPU can't keep up, it gets further behind because it ends up calling bge_start() at least once for every packet, so any overheads in bge_start() are not amortized across multiple packets. Thus the PCI read had an especially high overhead. For larger packets, the speedup is closer to the 1.8% claimed in rev. 1.108. Rev.1.108 claims to eliminate a PCI write but actually eliminates a PCI read. The write of the tx product index is not so costly as its read, and cannot be eliminated completely. It could be coalesced in some cases. Revision Changes Path 1.3.2.42 +8 -4 src/sys/dev/bge/if_bge.c 1.1.2.22 +1 -0 src/sys/dev/bge/if_bgereg.h