https://github.com/torvalds/linux
Revision d58cdfb89ce0c6bd5f81ae931a984ef298dbda20 authored by Vasily Tarasov on 12 October 2006, 13:09:51 UTC, committed by Jens Axboe on 12 October 2006, 13:09:51 UTC
Currently ioprio_best function first checks wethere aioprio or bioprio equals
IOPRIO_CLASS_NONE (ioprio_valid() macros does that) and if it is so it returns
bioprio/aioprio appropriately. Thus the next four lines, that set aclass/bclass
to IOPRIO_CLASS_BE, if aclass/bclass == IOPRIO_CLASS_NONE, are never executed.

The second problem: if aioprio from class IOPRIO_CLASS_NONE and bioprio from
class IOPRIO_CLASS_IDLE are passed to ioprio_best function, it will return
IOPRIO_CLASS_IDLE. It means that during __make_request we can merge two
requests and set the priority of merged request to IDLE, while one of
the initial requests originates from a process with NONE (default) priority.
So we can get a situation when a process with default ioprio will experience
IO starvation, while there is no process from real-time class in the system.

Just removing ioprio_valid check should correct situation.

Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent cea2885
History
Tip revision: d58cdfb89ce0c6bd5f81ae931a984ef298dbda20 authored by Vasily Tarasov on 12 October 2006, 13:09:51 UTC
[PATCH] block layer: ioprio_best function fix
Tip revision: d58cdfb
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 542 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.2 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 73.2 KB
Makefile -rw-r--r-- 48.9 KB
README -rw-r--r-- 16.2 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top