From owner-cvs-src-old@FreeBSD.ORG Mon Feb 22 17:04:06 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D02B1065698 for ; Mon, 22 Feb 2010 17:04:06 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 797E48FC19 for ; Mon, 22 Feb 2010 17:04:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o1MH46ch017600 for ; Mon, 22 Feb 2010 17:04:06 GMT (envelope-from gibbs@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o1MH468Z017599 for cvs-src-old@freebsd.org; Mon, 22 Feb 2010 17:04:06 GMT (envelope-from gibbs@repoman.freebsd.org) Message-Id: <201002221704.o1MH468Z017599@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to gibbs@repoman.freebsd.org using -f From: "Justin T. Gibbs" Date: Mon, 22 Feb 2010 17:03:45 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 busdma_machdep.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2010 17:04:06 -0000 gibbs 2010-02-22 17:03:45 UTC FreeBSD src repository Modified files: sys/amd64/amd64 busdma_machdep.c Log: SVN rev 204214 on 2010-02-22 17:03:45Z by gibbs Enforce stronger semantics for bus-dma alignment (currently only on amd64). Now all contiguous regions returned from bus-dma will be aligned to the alignment constraint and all but the last region are guaranteed to be a multiple of the alignment in length. This also means that the relative alignment of two adjacent bytes in the I/O stream have a difference of 1 even if they are not physically contiguous. The old code, when needing to perform a copy in order to align data, only copied the amount of data needed to reach the next page boundary. This often left an unaligned end to the segment. Drivers such as Xen's blkfront can't deal with such segments. The downside to this approach is that, once an unaligned region is encountered, the remainder of the I/O will be bounced. However, bouncing should be rare. It is typically caused by non-performance critical userland programs that don't bother to align their I/O buffers (e.g. bsdlabel). In-kernel I/O buffers are always aligned to at least a page boundary. Reviewed by: scottl MFC after: 2 weeks Revision Changes Path 1.92 +19 -12 src/sys/amd64/amd64/busdma_machdep.c