Re: [PATCH]block: don't delay blk_run_queue_async

From: Jens Axboe
Date: Wed May 18 2011 - 05:11:43 EST


On 2011-05-18 10:42, Shaohua Li wrote:
> Let's check a scenario:
> 1. blk_delay_queue(q, SCSI_QUEUE_DELAY);
> 2. blk_run_queue_async();
> the second one will became a noop, because q->delay_work already has
> WORK_STRUCT_PENDING_BIT set, so the delayed work will still run after
> SCSI_QUEUE_DELAY. But blk_run_queue_async actually hopes the delayed
> work runs immediately.

Good catch. I wonder if it wouldn't be better to "fix"
queue_delayed_work() instead. If the time passed in is before the
scheduled event, adjust the timeout.

But as a 2.6.39 fix, this is good, will queue up.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/