aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-08-29 09:05:44 +0200
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 20:29:36 +0200
commitfc46379daf90dce57bf765c81d3b39f55150aac2 (patch)
tree43aa28f0db6c73f137550b0b2e2ec29b9f9a1fc6 /fs
parent89850f7ee905410c89f9295e89dc4c33502a34ac (diff)
[PATCH] cfq-iosched: kill cfq_exit_lock
cfq_exit_lock is protecting two things now: - The per-ioc rbtree of cfq_io_contexts - The per-cfqd linked list of cfq_io_contexts The per-cfqd linked list can be protected by the queue lock, as it is (by definition) per cfqd as the queue lock is. The per-ioc rbtree is mainly used and updated by the process itself only. The only outside use is the io priority changing. If we move the priority changing to not browsing the rbtree, we can remove any locking from the rbtree updates and lookup completely. Let the sys_ioprio syscall just mark processes as having the iopriority changed and lazily update the private cfq io contexts the next time io is queued, and we can remove this locking as well. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/ioprio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 78b1deae3fa..0fd1089d7bf 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -47,8 +47,8 @@ static int set_task_ioprio(struct task_struct *task, int ioprio)
/* see wmb() in current_io_context() */
smp_read_barrier_depends();
- if (ioc && ioc->set_ioprio)
- ioc->set_ioprio(ioc, ioprio);
+ if (ioc)
+ ioc->ioprio_changed = 1;
task_unlock(task);
return 0;