if: improve performance of big bio requests

Writethrough of bio requests having more than one biovec should
only sync the last one. The others will be written to the transaction
log anyway. No need to wait for each of them to be committed one
by one.
This commit is contained in:
Thomas Schoebel-Theuer 2013-04-18 18:38:03 +02:00
parent 8f6054b0cc
commit e4e9308310
1 changed files with 8 additions and 3 deletions

View File

@ -519,9 +519,14 @@ if_make_request(struct request_queue *q, struct bio *bio)
mref_a->orig_biow[0] = biow;
mref_a->bio_count = 1;
assigned = true;
if (do_skip_sync) {
mref->ref_skip_sync = true;
/* When a bio with multiple biovecs is split into
* multiple mrefs, only the last one should be
* working in synchronous writethrough mode.
*/
mref->ref_skip_sync = true;
if (!do_skip_sync && i + 1 >= bio->bi_vcnt) {
mref->ref_skip_sync = false;
}
atomic_inc(&input->plugged_count);