xen-block: improve response latency
commitbfd0d6366043935990a69ed4d8183f88772256ee
authorTim Smith <tim.smith@citrix.com>
Wed, 12 Dec 2018 11:16:25 +0000 (12 11:16 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 14 Jan 2019 13:45:40 +0000 (14 13:45 +0000)
treeae79aa05a64d47e64181b49c267c528dc020dd22
parent6de45f91096da4d5e91f72a21bdfc86e7b506b67
xen-block: improve response latency

If the I/O ring is full, the guest cannot send any more requests
until some responses are sent. Only sending all available responses
just before checking for new work does not leave much time for the
guest to supply new work, so this will cause stalls if the ring gets
full. Also, not completing reads as soon as possible adds latency
to the guest.

To alleviate that, complete IO requests as soon as they come back.
xen_block_send_response() already returns a value indicating whether
a notify should be sent, which is all the batching we need.

Signed-off-by: Tim Smith <tim.smith@citrix.com>
Re-based and commit comment adjusted.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
hw/block/dataplane/xen-block.c