Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2010 17:03:45 +0000 (UTC)
From:      "Justin T. Gibbs" <gibbs@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/amd64/amd64 busdma_machdep.c
Message-ID:  <201002221704.o1MH468Z017599@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002221704.o1MH468Z017599>