Skip to content

Commit

Permalink
virtio_blk: Drop unused request tracking list
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
Asias He authored and rustyrussell committed May 22, 2012
1 parent b79d866 commit f65ca1d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ struct virtio_blk
/* The disk structure for the kernel. */
struct gendisk *disk;

/* Request tracking. */
struct list_head reqs;

mempool_t *pool;

/* Process context for config space updates */
Expand All @@ -55,7 +52,6 @@ struct virtio_blk

struct virtblk_req
{
struct list_head list;
struct request *req;
struct virtio_blk_outhdr out_hdr;
struct virtio_scsi_inhdr in_hdr;
Expand Down Expand Up @@ -99,7 +95,6 @@ static void blk_done(struct virtqueue *vq)
}

__blk_end_request_all(vbr->req, error);
list_del(&vbr->list);
mempool_free(vbr, vblk->pool);
}
/* In case queue is stopped waiting for more buffers. */
Expand Down Expand Up @@ -184,7 +179,6 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
return false;
}

list_add_tail(&vbr->list, &vblk->reqs);
return true;
}

Expand Down Expand Up @@ -437,7 +431,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}

INIT_LIST_HEAD(&vblk->reqs);
spin_lock_init(&vblk->lock);
vblk->vdev = vdev;
vblk->sg_elems = sg_elems;
Expand Down Expand Up @@ -591,9 +584,6 @@ static void __devexit virtblk_remove(struct virtio_device *vdev)
vblk->config_enable = false;
mutex_unlock(&vblk->config_lock);

/* Nothing should be pending. */
BUG_ON(!list_empty(&vblk->reqs));

/* Stop all the virtqueues. */
vdev->config->reset(vdev);

Expand Down

0 comments on commit f65ca1d

Please sign in to comment.