On Tue, Feb 26, 2013 at 05:02:19PM +0000, Dietmar Maurer wrote: > > If you want to implement an alternative to rate-limiting, please do it in a > > separate patch series and make it work for all block job types. > > Well, I hoped you can see how to fix that. I guess the same applies for other > types of block > jobs, and I simply found no other solution. > > Adding and IO queue and implement a scheduler is likely not what we want to > do.
The starting point for something smarter than just no policy or rate-limiting is BlockDriverState->tracked_requests. block.c keeps track of active requests using this list. The simplest policy using bs->tracked_requests is to only submit block job I/O requests when the list is empty. Want to try this approach? (The drawback is that the guest can starve the block job by submitting I/O all the time.) Stefan