Re: [PATCH, RFC] blk-mq: use a delayed work item for timeouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/2015 02:22 PM, Christoph Hellwig wrote:
On Mon, Oct 12, 2015 at 02:08:04PM -0600, Jens Axboe wrote:
No that's definitely fine with me, imho most error handling callbacks
should be in process context for ease of use in the driver.

Took a closer look. The patch looks incomplete. The hot path for blk-mq is
blk_add_timer(), looks like you left that one alone in the conversion?

Oh, damn.  I had that part in my initial version that also crudely
converted the old request code and dropped a bit too much.  That should
defintively do the queue_deayed_work.

Yep

Might be easier to just leave the timer alone, and if it actually fires
_and_ we have to do something, punt to a workqueue instead of invoking the
timeout handler directly.

queue_delayed_work just assigns two additional fields, then sets
timer->experies and does an add_timer.  So it's the generic implementation
of your above scheme.  I'd much rather use the generic version if
possible instead of trying to recreate it.

I agree, converting to delayed work in general is the cleaner solution. The hot path is really NOT doing anything at all, that's the usual path. If it isn't, then we've screwed up. And the conversion to delayed_work_pending() from timer_pending() looks fine as well, that's another important piece.

--
Jens Axboe

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux