From: Corrado Zoccolo Date: Thu, 26 Nov 2009 09:02:58 +0000 (+0100) Subject: cfq-iosched: fix no-idle preemption logic X-Git-Tag: v2.6.33-rc1~379^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4a229196a7c676514c78f6783f8994f64bf681c;p=pandora-kernel.git cfq-iosched: fix no-idle preemption logic An incoming no-idle queue should preempt the active no-idle queue only if the active queue is idling due to service tree empty. Previous code was buggy in two ways: * it relied on service_tree field to be set on the active queue, while it is not set when the code is idling for a new request * it didn't check for the service tree empty condition, so could lead to LIFO behaviour if multiple queues with depth > 1 were preempting each other on an non-NCQ device. Reported-by: Vivek Goyal Signed-off-by: Corrado Zoccolo Acked-by: Vivek Goyal Signed-off-by: Jens Axboe --- Reading git-diff-tree failed