Thread (9 messages) 9 messages, 3 authors, 2013-03-19

Re: [PATCH 1/2] tcm_vhost: Wait for pending requests in vhost_scsi_flush()

From: Asias He <hidden>
Date: 2013-03-12 01:31:35
Also in: kvm

On Mon, Mar 11, 2013 at 12:36:37PM +0100, Paolo Bonzini wrote:
Il 11/03/2013 06:09, Asias He ha scritto:
quoted
This patch makes vhost_scsi_flush() wait for all the pending requests
issued before the flush operation to be finished.
There is no protection against issuing concurrent flush operations.  If
we later would like to make the flush a ioctl (for example for migration
purposes), it would be confusing, and I'm not sure how you could extend
the during_flush machinery.
vhost_scsi_flush() is called under the vs->dev.mutex lock.
What about making vhost_scsi_flush() wait for all pending requests,
including those issues during the flush operation?
This will take unbonded time if guest keep sending requests.
Then you can easily
support concurrent flushes; just add a waitqueue and wake_up_all at the
end of the flush operation.
I am not sure why we want concurrent flushes. The flush thing is
already getting complex.
BTW, adding such a ioctl as part of this patch would probably be a good
thing to do anyway.

Paolo
-- 
Asias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help