Re: [PATCH 2/6] block: allow blk_execute_rq_nowait() to be calledform IRQ context

From: Christoph Hellwig
Date: Fri Oct 21 2011 - 05:20:46 EST


On Thu, Oct 20, 2011 at 08:56:36PM -0700, Tejun Heo wrote:
> Currently blk_execute_rq_nowait() directly calls __blk_run_queue() and
> thus can't be called from IRQ context. This patch updates it to use
> blk_run_queue_async() instead. This will be used to unexport
> elv_add_request().
>
> This changes how queue is kicked after blk_execute_rq_nowait() but
> it's hardly a hot path and the effect shouldn't be noticeable.

It actually very much is a fasthpath for many of it's users, e.g. the
SCSI tape drivers, the OSD layer and the target scsi passthrough
backend.

I don't think blindly adding a context switch here without benchmarking
is doable. Just add variants that do the workqueue dance or not.

--
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/