aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov2007-11-05 01:58:05 -0600
committerJens Axboe2007-11-07 02:45:00 -0600
commit2389d1ef172fc9df01f58265a436919d233fbc27 (patch)
treea59a1768a953ba27cf370c6634473679580c505d /block/cfq-iosched.c
parentdbeeb816e805091e7cfc03baf36dc40b4adb2bbd (diff)
downloadkernel-common-2389d1ef172fc9df01f58265a436919d233fbc27.tar.gz
kernel-common-2389d1ef172fc9df01f58265a436919d233fbc27.tar.xz
kernel-common-2389d1ef172fc9df01f58265a436919d233fbc27.zip
cfq: fix IOPRIO_CLASS_IDLE accounting
Spotted by Nick <gentuu@gmail.com>, hopefully can explain the second trace in http://bugzilla.kernel.org/show_bug.cgi?id=9180. If ->async_idle_cfqq != NULL cfq_put_async_queues() puts it IOPRIO_BE_NR times in a loop. Fix this. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index e47a9309eb4..61a3f22eee2 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2068,9 +2068,10 @@ static void cfq_put_async_queues(struct cfq_data *cfqd)
2068 cfq_put_queue(cfqd->async_cfqq[0][i]); 2068 cfq_put_queue(cfqd->async_cfqq[0][i]);
2069 if (cfqd->async_cfqq[1][i]) 2069 if (cfqd->async_cfqq[1][i])
2070 cfq_put_queue(cfqd->async_cfqq[1][i]); 2070 cfq_put_queue(cfqd->async_cfqq[1][i]);
2071 if (cfqd->async_idle_cfqq)
2072 cfq_put_queue(cfqd->async_idle_cfqq);
2073 } 2071 }
2072
2073 if (cfqd->async_idle_cfqq)
2074 cfq_put_queue(cfqd->async_idle_cfqq);
2074} 2075}
2075 2076
2076static void cfq_exit_queue(elevator_t *e) 2077static void cfq_exit_queue(elevator_t *e)