diff options
| author | Jens Axboe <axboe@suse.de> | 2004-10-27 18:34:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-27 18:34:55 -0700 |
| commit | b743892da221b8653bc6e61640e89d13ae99dd72 (patch) | |
| tree | 0a15a1ad001d0cfe17db834d763742253997d8f5 /kernel | |
| parent | c8d6003375f696537f2a8cb518dbf86cc93e4f02 (diff) | |
[PATCH] issues with online scheduler switching
There are two issues with online io scheduler switching that this patch
addresses. The first is pretty simple - it concerns racing with scheduler
removal on switch. elevator_find() does not grab a reference to the io
scheduler, so before elevator_attach() is run it could go away. Add
elevator_get() to solve that.
Second issue is the flushing out of requests that is needed before
switching can be problematic with requests that aren't allocated in the
block layer (such as requests on the stack of a process). The problem is
that we don't know when they will have finished, and most io schedulers
need to access the elevator structures on io completion. This can be fixed
by adding an intermedia step that switches to noop, since it doesn't need
to touch anything but the request_queue. The queue drain can then safely
be split into two operations - one that waits for file system requests, and
one that waits for the queue to completely empty. Requests arriving after
the first drain will get stuck in a seperate queue list.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
