[Devel] [PATCH RHEL7 COMMIT] vziolimit: port diff-ubc-iostat-wire-vziolimit-into-deadline-io_scheduler
Konstantin Khorenko
khorenko at odin.com
Tue May 5 02:44:44 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.4.9
------>
commit 2e9e25bf5876c8354762828ca7c86f86eb72873d
Author: Dmitry Monakhov <dmonakhov at openvz.org>
Date: Tue May 5 13:44:44 2015 +0400
vziolimit: port diff-ubc-iostat-wire-vziolimit-into-deadline-io_scheduler
vziolimit: wire into deadline io-scheduler
Trivial patch for supporting deadline scheduler in iostat/iolimit
https://jira.sw.ru/browse/PCLIN-31058
Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
====================================
https://jira.sw.ru/browse/PSBM-20104
Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
block/deadline-iosched.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 20614a3..8923afa 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/compiler.h>
#include <linux/rbtree.h>
+#include <bc/io_acct.h>
/*
* See Documentation/block/deadline-iosched.txt
@@ -108,6 +109,8 @@ deadline_add_request(struct request_queue *q, struct request *rq)
*/
rq_set_fifo_time(rq, jiffies + dd->fifo_expire[data_dir]);
list_add_tail(&rq->queuelist, &dd->fifo_list[data_dir]);
+ ub_writeback_io(1, blk_rq_sectors(rq));
+ virtinfo_notifier_call_irq(VITYPE_IO, VIRTINFO_IO_OP_ACCOUNT, NULL);
}
/*
@@ -186,6 +189,12 @@ deadline_merged_requests(struct request_queue *q, struct request *req,
deadline_remove_request(q, next);
}
+static void deadline_bio_merged(struct request_queue *q, struct request *req,
+ struct bio *bio)
+{
+ ub_writeback_io(0, bio_sectors(bio));
+}
+
/*
* move request from sort list to dispatch queue.
*/
@@ -445,6 +454,7 @@ static struct elevator_type iosched_deadline = {
.elevator_merge_fn = deadline_merge,
.elevator_merged_fn = deadline_merged_request,
.elevator_merge_req_fn = deadline_merged_requests,
+ .elevator_bio_merged_fn = deadline_bio_merged,
.elevator_dispatch_fn = deadline_dispatch_requests,
.elevator_add_req_fn = deadline_add_request,
.elevator_former_req_fn = elv_rb_former_request,
More information about the Devel
mailing list