Date: Fri, 30 May 2014 16:54:06 +0200 From: Attilio Rao <attilio@freebsd.org> To: Scott Long <scottl@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "Peel, Casey" <casey.peel@isilon.com>, Benno Rice <benno@freebsd.org> Subject: Re: svn commit: r266775 - head/sys/x86/x86 Message-ID: <CAJ-FndDzh1qSsHSAXbYQoYrFGC5aHRG1Z1t18Jnzg0qUBNxAQw@mail.gmail.com> In-Reply-To: <201405272131.s4RLVBEU035321@svn.freebsd.org> References: <201405272131.s4RLVBEU035321@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 27, 2014 at 11:31 PM, Scott Long <scottl@freebsd.org> wrote: > Author: scottl > Date: Tue May 27 21:31:11 2014 > New Revision: 266775 > URL: http://svnweb.freebsd.org/changeset/base/266775 > > Log: > Eliminate the fake contig_dmamap and replace it with a new flag, > BUS_DMA_KMEM_ALLOC. They serve the same purpose, but using the flag > means that the map can be NULL again, which in turn enables significant > optimizations for the common case of no bouncing. While I think this is in general a good idea, unfortunately our drivers do so many dumb things when freeing DMA allocated buffers that having a NULL map is going to cause some "turbolence" and make such bugs more visible. An example is with ATA, where I think this fix is needed: http://www.freebsd.org/~attilio/dmamem_free-ata.patch Otherwise, what can happen with bounce buffers, is that the allocated memory via contig malloc was not going to be freed anytime. I tried to look around and I found questionable (read broken) code in basically every driver which allocates DMA buffers, so I really don't feel I want to fix the majority of our drivers. I just think such paths are not excercised enough to be seen in practice often or the bugs just get unnoticed. Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-FndDzh1qSsHSAXbYQoYrFGC5aHRG1Z1t18Jnzg0qUBNxAQw>