xen-block: improve batching behaviour
commit6de45f91096da4d5e91f72a21bdfc86e7b506b67
authorTim Smith <tim.smith@citrix.com>
Wed, 12 Dec 2018 11:16:24 +0000 (12 11:16 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 14 Jan 2019 13:45:40 +0000 (14 13:45 +0000)
treefea0ecb0771a13851c064a6132cf829737a1c8fa
parent1077bcaccd6596ce6ccc67eee8b2c1bab112fa68
xen-block: improve batching behaviour

When I/O consists of many small requests, performance is improved by
batching them together in a single io_submit() call. When there are
relatively few requests, the extra overhead is not worth it. This
introduces a check to start batching I/O requests via blk_io_plug()/
blk_io_unplug() in an amount proportional to the number which were
already in flight at the time we started reading the ring.

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