From 492c30af2567a59413c064f88eb81e1691865195 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 31 Oct 2008 17:25:56 +0000 Subject: Make DMA bottom-half driven (v2) 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. 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 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5573 c046a42c-6fe2-441c-8c8c-71466251a162 --- vl.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 137074b9ef..a7c55516de 100644 --- a/vl.c +++ b/vl.c @@ -7983,8 +7983,6 @@ void main_loop_wait(int timeout) if (likely(!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))) qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL], qemu_get_clock(vm_clock)); - /* run dma transfers, if any */ - DMA_run(); } /* real time timers */ -- cgit v1.2.3