Am 31.10.2011 16:34, schrieb Paolo Bonzini: > On 10/31/2011 03:46 PM, Kevin Wolf wrote: >>> Hmm, I think you should set rearm = 1 to ensure the BH is run when >>> ultimately you leave the sync read. Sorry for not spotting this before. >> >> I was about to agree, but in fact adding a rearm = 1; line leads to >> crashes, whereas in the version I posted it just works. So it looks like >> something is wrong with doing it, even though it seemed to make perfect >> sense at the first sight. > > But what will restart the DMA at the end of the synchronous I/O, then?
bdrv_read/write are called inside fdctrl_read_data(), so the outer DMA_run() already has rearm = 1. I think the more interesting question is why rescheduling can break anything. Where would we schedule the BH additionally when it isn't already scheduled anyway? Kevin