diff options
author | Jens Axboe <axboe@suse.de> | 2006-06-14 03:10:45 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-06-23 11:10:39 -0400 |
commit | 35e6077cb16f93517ba5a51ba849b186d2474d60 (patch) | |
tree | 215bcf3548d80365b3cd3673feddf6a8f8ba9fbc /block | |
parent | b17fd9bceb99610f6dc7998c9a4ed6b71520be2b (diff) |
[PATCH] cfq-iosched: correctly set ioprio on both targets
Patch originally from Vasily Tarasov <vtaras@sw.ru>
If you set io-priority of process 1 using sys_ioprio_set system call by
another process 2 (like ionice do), then cfq_init_prio_data() function
sets priority of process 2 (current) on queue of process 1 and clears
the flag, that designates change of ioprio. So the process 1 will work
like with priority of process 2.
I propose not to call cfq_init_prio_data() on io-priority change, but
only mark queue as queue with changed prority. Every time when new
request comes cfq-scheduler checks for this flag and atomaticaly changes
priority of queue to new value.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4c4e9cc3ae2..84b75f88c27 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1388,10 +1388,9 @@ static inline void changed_ioprio(struct cfq_io_context *cic) | |||
1388 | } | 1388 | } |
1389 | } | 1389 | } |
1390 | cfqq = cic->cfqq[SYNC]; | 1390 | cfqq = cic->cfqq[SYNC]; |
1391 | if (cfqq) { | 1391 | if (cfqq) |
1392 | cfq_mark_cfqq_prio_changed(cfqq); | 1392 | cfq_mark_cfqq_prio_changed(cfqq); |
1393 | cfq_init_prio_data(cfqq); | 1393 | |
1394 | } | ||
1395 | spin_unlock(cfqd->queue->queue_lock); | 1394 | spin_unlock(cfqd->queue->queue_lock); |
1396 | } | 1395 | } |
1397 | } | 1396 | } |