Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b70c864d3ce706571d2f3cac1d35d4fba01d6072
Commit:     b70c864d3ce706571d2f3cac1d35d4fba01d6072
Parent:     2389d1ef172fc9df01f58265a436919d233fbc27
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 09:46:13 2007 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Wed Nov 7 09:46:13 2007 +0100

    cfq: fix IOPRIO_CLASS_IDLE delays
    
    After the fresh boot:
    
        ionice -c3 -p $$
        echo cfq >> /sys/block/XXX/queue/scheduler
        dd if=/dev/XXX of=/dev/null bs=512 count=1
    
    Now dd hangs in D state and the queue is completely stalled for 
approximately
    INITIAL_JIFFIES + CFQ_IDLE_GRACE jiffies. This is because cfq_init_queue()
    forgets to initialize cfq_data->last_end_request.
    
    (I guess this patch is not complete, overflow is still possible)
    
    Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/cfq-iosched.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 61a3f22..6831a75 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2126,6 +2126,7 @@ static void *cfq_init_queue(struct request_queue *q)
 
        INIT_WORK(&cfqd->unplug_work, cfq_kick_queue);
 
+       cfqd->last_end_request = jiffies;
        cfqd->cfq_quantum = cfq_quantum;
        cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0];
        cfqd->cfq_fifo_expire[1] = cfq_fifo_expire[1];
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to