From owner-cvs-src@FreeBSD.ORG Mon Sep 11 06:48:53 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 861FA16A407; Mon, 11 Sep 2006 06:48:53 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 572E243D45; Mon, 11 Sep 2006 06:48:53 +0000 (GMT) (envelope-from scottl@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 k8B6mrXU075483; Mon, 11 Sep 2006 06:48:53 GMT (envelope-from scottl@repoman.freebsd.org) Received: (from scottl@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8B6mrlm075482; Mon, 11 Sep 2006 06:48:53 GMT (envelope-from scottl) Message-Id: <200609110648.k8B6mrlm075482@repoman.freebsd.org> From: Scott Long Date: Mon, 11 Sep 2006 06:48:53 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/i386/i386 busdma_machdep.c 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: Mon, 11 Sep 2006 06:48:53 -0000 scottl 2006-09-11 06:48:53 UTC FreeBSD src repository Modified files: sys/i386/i386 busdma_machdep.c Log: The run_filter() procedure is a means of working around DMA engine bugs in old/broken hardware. Unfortunately, it adds cache pressure and possible mispredicted branches to the fast path of the bus_dmamap_load collection of functions. Since it's meant for slow path exception processing, de-inline it and allow its conditions to be pre-computed at tag_create time and thus short-circuited at runtime. While here, cut down on the size of _bus_dmamap_load_buffer() by pushing the bounce page logic into a non-inlined function. Again, this helps with cache pressure and mispredicted branches. According to the TSC, this shaves off a few cycles on average. Unfortunately, the data varies quite a bit due to interrupts and preemption, so it's hard to get a good measurement. Real world measurements of network PPS are welcomed. A merge to amd64 and other arches is pending more testing. Revision Changes Path 1.81 +55 -33 src/sys/i386/i386/busdma_machdep.c