lkml.org 
[lkml]   [2006]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectCFQ ioprio setting patch
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.

Small patch is below.
--- linux-2.6.16-026stab012-ioprio/block/cfq-iosched.c.orig 2006-05-29 13:46:20.000000000 +0400
+++ linux-2.6.16-026stab012-ioprio/block/cfq-iosched.c 2006-05-24 15:31:24.000000000 +0400
@@ -1325,7 +1325,6 @@ static inline void changed_ioprio(struct

spin_lock(cfqd->queue->queue_lock);
cfq_mark_cfqq_prio_changed(cfqq);
- cfq_init_prio_data(cfqq);
spin_unlock(cfqd->queue->queue_lock);
}
}
\
 
 \ /
  Last update: 2006-05-29 13:59    [W:2.601 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site