diff options
author | Asias He <asias@redhat.com> | 2012-03-29 23:24:10 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-05-21 22:46:14 -0400 |
commit | f65ca1dc6a8c81c6bd72297d4399ec5f4c1f3a01 (patch) | |
tree | e2c1fe6ebc2ec6a9ee6b31f06404b5df2b9f6b3d /drivers | |
parent | b79d866c8b7014a51f611a64c40546109beaf24a (diff) |
virtio_blk: Drop unused request tracking list
Benchmark shows small performance improvement on fusion io device.
Before:
seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec
After:
seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msec
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/virtio_blk.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 9d2223bba90c..693187df7601 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -29,9 +29,6 @@ struct virtio_blk | |||
29 | /* The disk structure for the kernel. */ | 29 | /* The disk structure for the kernel. */ |
30 | struct gendisk *disk; | 30 | struct gendisk *disk; |
31 | 31 | ||
32 | /* Request tracking. */ | ||
33 | struct list_head reqs; | ||
34 | |||
35 | mempool_t *pool; | 32 | mempool_t *pool; |
36 | 33 | ||
37 | /* Process context for config space updates */ | 34 | /* Process context for config space updates */ |
@@ -55,7 +52,6 @@ struct virtio_blk | |||
55 | 52 | ||
56 | struct virtblk_req | 53 | struct virtblk_req |
57 | { | 54 | { |
58 | struct list_head list; | ||
59 | struct request *req; | 55 | struct request *req; |
60 | struct virtio_blk_outhdr out_hdr; | 56 | struct virtio_blk_outhdr out_hdr; |
61 | struct virtio_scsi_inhdr in_hdr; | 57 | struct virtio_scsi_inhdr in_hdr; |
@@ -99,7 +95,6 @@ static void blk_done(struct virtqueue *vq) | |||
99 | } | 95 | } |
100 | 96 | ||
101 | __blk_end_request_all(vbr->req, error); | 97 | __blk_end_request_all(vbr->req, error); |
102 | list_del(&vbr->list); | ||
103 | mempool_free(vbr, vblk->pool); | 98 | mempool_free(vbr, vblk->pool); |
104 | } | 99 | } |
105 | /* In case queue is stopped waiting for more buffers. */ | 100 | /* In case queue is stopped waiting for more buffers. */ |
@@ -184,7 +179,6 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk, | |||
184 | return false; | 179 | return false; |
185 | } | 180 | } |
186 | 181 | ||
187 | list_add_tail(&vbr->list, &vblk->reqs); | ||
188 | return true; | 182 | return true; |
189 | } | 183 | } |
190 | 184 | ||
@@ -437,7 +431,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
437 | goto out_free_index; | 431 | goto out_free_index; |
438 | } | 432 | } |
439 | 433 | ||
440 | INIT_LIST_HEAD(&vblk->reqs); | ||
441 | spin_lock_init(&vblk->lock); | 434 | spin_lock_init(&vblk->lock); |
442 | vblk->vdev = vdev; | 435 | vblk->vdev = vdev; |
443 | vblk->sg_elems = sg_elems; | 436 | vblk->sg_elems = sg_elems; |
@@ -591,9 +584,6 @@ static void __devexit virtblk_remove(struct virtio_device *vdev) | |||
591 | vblk->config_enable = false; | 584 | vblk->config_enable = false; |
592 | mutex_unlock(&vblk->config_lock); | 585 | mutex_unlock(&vblk->config_lock); |
593 | 586 | ||
594 | /* Nothing should be pending. */ | ||
595 | BUG_ON(!list_empty(&vblk->reqs)); | ||
596 | |||
597 | /* Stop all the virtqueues. */ | 587 | /* Stop all the virtqueues. */ |
598 | vdev->config->reset(vdev); | 588 | vdev->config->reset(vdev); |
599 | 589 | ||