lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch v2 8/8]block: fiops sync preempts async
Debug patch only.

This implements CFQ like sync preempts async. But like CFQ, this
will starve async.

---
block/fiops-iosched.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Index: linux/block/fiops-iosched.c
===================================================================
--- linux.orig/block/fiops-iosched.c 2012-01-21 10:35:04.000000000 +0800
+++ linux/block/fiops-iosched.c 2012-01-21 10:48:52.000000000 +0800
@@ -408,6 +408,21 @@ static struct fiops_ioc *fiops_select_io
return NULL;
}

+ /* Let sync request preempt async queue */
+ if (!rq_is_sync(rq) && service_tree->count > 1) {
+ struct rb_node *tmp = rb_next(&ioc->rb_node);
+ struct fiops_ioc *sync_ioc = NULL;
+ while (tmp) {
+ sync_ioc = rb_entry(tmp, struct fiops_ioc, rb_node);
+ rq = rq_entry_fifo(sync_ioc->fifo.next);
+ if (rq_is_sync(rq))
+ break;
+ tmp = rb_next(&sync_ioc->rb_node);
+ }
+ if (sync_ioc)
+ ioc = sync_ioc;
+ }
+
return ioc;
}



\
 
 \ /
  Last update: 2012-01-30 08:11    [W:0.056 / U:6.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site