From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtT9H-0004eD-4C for qemu-devel@nongnu.org; Fri, 24 Oct 2008 16:20:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtT9F-0004dZ-Hy for qemu-devel@nongnu.org; Fri, 24 Oct 2008 16:20:42 -0400 Received: from [199.232.76.173] (port=49594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtT9F-0004dT-D9 for qemu-devel@nongnu.org; Fri, 24 Oct 2008 16:20:41 -0400 Received: from bart.se.axis.com ([195.60.68.10]:37048) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KtT9F-0004Yp-3O for qemu-devel@nongnu.org; Fri, 24 Oct 2008 16:20:41 -0400 Received: from bart.se.axis.com (bart.se.axis.com [127.0.0.1]) by bart.se.axis.com (Postfix) with ESMTP id 3AB77641A4 for ; Fri, 24 Oct 2008 22:20:40 +0200 (CEST) Received: from axis.com (edgar.se.axis.com [10.93.151.1]) by bart.se.axis.com (Postfix) with ESMTP id 21B2D64170 for ; Fri, 24 Oct 2008 22:20:40 +0200 (CEST) Date: Fri, 24 Oct 2008 22:20:40 +0200 From: "Edgar E. Iglesias" Message-ID: <20081024202040.GB26209@edgar.se.axis.com> References: <1224875740-23121-1-git-send-email-aliguori@us.ibm.com> <1224875740-23121-2-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1224875740-23121-2-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] Re: [PATCH 2/2/][RFT] Make DMA bottom-half driven (v2) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Edgar Iglesias , qemu-devel@nongnu.org On Fri, Oct 24, 2008 at 02:15:40PM -0500, Anthony Liguori wrote: > The current DMA routines are driven by a call in main_loop_wait() after every > select. > > This patch converts the DMA code to be driven by a constantly rescheduled > bottom half. The advantage of using a scheduled bottom half is that we can > stop scheduling the bottom half when there no DMA channels are runnable. This > means we can potentially detect this case and sleep longer in the main loop. > > The only two architectures implementing DMA_run() are cris and i386. For cris, > I converted it to a simple repeating bottom half. I've only compile tested > this as cris does not seem to work on a 64-bit host. It should be functionally > identical to the previous implementation so I expect it to work. Hello, Thanks for the update. This version works much better for CRIS/ETRAX. The code looks good as far as I can tell. > > For x86, I've made sure to only fire the DMA bottom half if there is a DMA > channel that is runnable. The effect of this is that unless you're using sb16 > or a floppy disk, the DMA bottom half never fires. > > You probably should test this malc. My own benchmarks actually show slight > improvement by it's possible the change in timing could affect your demos. > > Since v1, I've changed the code to use a BH instead of a timer. cris at least > seems to depend on faster than 10ms polling. > > Signed-off-by: Anthony Liguori Acked-by: Edgar E. Iglesias