On 12/02/12 14:23, Tejun Heo wrote:
On Wed, Nov 28, 2012 at 01:44:53PM +0100, Bart Van Assche wrote:
A block driver may start cleaning up resources needed by its
request_fn as soon as blk_cleanup_queue() finished, so request_fn
must not be invoked after draining finished. This is important
when blk_run_queue() is invoked without any requests in progress.
As an example, if blk_drain_queue() and scsi_run_queue() run in
parallel, blk_drain_queue() may have finished all requests after
scsi_run_queue() has taken a SCSI device off the starved list but
before that last function has had a chance to run the queue.
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
Cc: James Bottomley <JBottomley@xxxxxxxxxxxxx>
Cc: Mike Christie <michaelc@xxxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Chanho Min <chanho.min@xxxxxxx>
Acked-by: Tejun Heo <tj@xxxxxxxxxx>
+inline void __blk_run_queue_uncond(struct request_queue *q)
Does this inline actually make a difference in the generated code?
Yes. Without that "inline" keyword that function is not inlined in
__blk_run_queue() but with that "inline" keyword it is inlined. At least
with gcc 4.7.1 - I have not checked any other gcc versions.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html