[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>
This commit is contained in:
Jens Axboe
2006-08-29 09:05:44 +02:00
committed by Jens Axboe
parent 89850f7ee9
commit fc46379daf
4 changed files with 21 additions and 41 deletions

View File

@@ -90,7 +90,7 @@ struct io_context {
atomic_t refcount;
struct task_struct *task;
int (*set_ioprio)(struct io_context *, unsigned int);
unsigned int ioprio_changed;
/*
* For request batching