diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-04-23 06:19:38 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-24 02:54:22 -0400 |
commit | f2d1f0ae7851be5ebd9613a80dac139270938809 (patch) | |
tree | 91efc4740f854b94ea84583a2cd6c34d14eafc8e /block/elevator.c | |
parent | 3ac6c9f8a66726745136e46f63600550c3eb6cec (diff) |
cfq-iosched: cache prio_tree root in cfqq->p_root
Currently we look it up from ->ioprio, but ->ioprio can change if
either the process gets its IO priority changed explicitly, or if
cfq decides to temporarily boost it. So if we are unlucky, we can
end up attempting to remove a node from a different rbtree root than
where it was added.
Fix this by using ->org_ioprio as the prio_tree index, since that
will only change for explicit IO priority settings (not for a boost).
Additionally cache the rbtree root inside the cfqq, then we don't have
to add code to reinsert the cfqq in the prio_tree if IO priority changes.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/elevator.c')
0 files changed, 0 insertions, 0 deletions