forked from Minki/linux
Revert "xen/blkback: Move the plugging/unplugging to a higher level."
This reverts commit 97961ef46b
b/c
we lose about 15% performance if we do the unplugging and the
end of the reading the ring buffer.
This commit is contained in:
parent
013c3ca184
commit
a19be5f0f0
@ -276,8 +276,6 @@ int xen_blkif_schedule(void *arg)
|
|||||||
printk(KERN_DEBUG "%s: started\n", current->comm);
|
printk(KERN_DEBUG "%s: started\n", current->comm);
|
||||||
|
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
struct blk_plug plug;
|
|
||||||
|
|
||||||
if (try_to_freeze())
|
if (try_to_freeze())
|
||||||
continue;
|
continue;
|
||||||
if (unlikely(vbd->size != vbd_sz(vbd)))
|
if (unlikely(vbd->size != vbd_sz(vbd)))
|
||||||
@ -294,13 +292,9 @@ int xen_blkif_schedule(void *arg)
|
|||||||
blkif->waiting_reqs = 0;
|
blkif->waiting_reqs = 0;
|
||||||
smp_mb(); /* clear flag *before* checking for work */
|
smp_mb(); /* clear flag *before* checking for work */
|
||||||
|
|
||||||
blk_start_plug(&plug);
|
|
||||||
|
|
||||||
if (do_block_io_op(blkif))
|
if (do_block_io_op(blkif))
|
||||||
blkif->waiting_reqs = 1;
|
blkif->waiting_reqs = 1;
|
||||||
|
|
||||||
blk_finish_plug(&plug);
|
|
||||||
|
|
||||||
if (log_stats && time_after(jiffies, blkif->st_print))
|
if (log_stats && time_after(jiffies, blkif->st_print))
|
||||||
print_stats(blkif);
|
print_stats(blkif);
|
||||||
}
|
}
|
||||||
@ -553,6 +547,7 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
|
|||||||
struct bio *biolist[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
struct bio *biolist[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
||||||
int i, nbio = 0;
|
int i, nbio = 0;
|
||||||
int operation;
|
int operation;
|
||||||
|
struct blk_plug plug;
|
||||||
|
|
||||||
switch (req->operation) {
|
switch (req->operation) {
|
||||||
case BLKIF_OP_READ:
|
case BLKIF_OP_READ:
|
||||||
@ -665,9 +660,15 @@ static void dispatch_rw_block_io(struct blkif_st *blkif,
|
|||||||
*/
|
*/
|
||||||
atomic_set(&pending_req->pendcnt, nbio);
|
atomic_set(&pending_req->pendcnt, nbio);
|
||||||
|
|
||||||
|
/* Get a reference count for the disk queue and start sending I/O */
|
||||||
|
blk_start_plug(&plug);
|
||||||
|
|
||||||
for (i = 0; i < nbio; i++)
|
for (i = 0; i < nbio; i++)
|
||||||
submit_bio(operation, biolist[i]);
|
submit_bio(operation, biolist[i]);
|
||||||
|
|
||||||
|
blk_finish_plug(&plug);
|
||||||
|
/* Let the I/Os go.. */
|
||||||
|
|
||||||
if (operation == READ)
|
if (operation == READ)
|
||||||
blkif->st_rd_sect += preq.nr_sects;
|
blkif->st_rd_sect += preq.nr_sects;
|
||||||
else if (operation == WRITE || operation == WRITE_BARRIER)
|
else if (operation == WRITE || operation == WRITE_BARRIER)
|
||||||
|
Loading…
Reference in New Issue
Block a user