Re: [PATCHSET v2] blk-mq: reimplement timeout handling

From: Tejun Heo
Date: Tue Dec 12 2017 - 16:40:14 EST


Hello, Jens.

On Tue, Dec 12, 2017 at 01:23:01PM -0700, Jens Axboe wrote:
> I like this a lot, it's a lot less fragile and more intuitive/readable
> than what we have now. And apparently less error prone... I'll do
> some testing with this.

Great.

> BTW, since youadd a few more BLK_MQ_F_BLOCKING checks, I think something
> like the below would be a good cleanup on top of this.
>
> From: Jens Axboe <axboe@xxxxxxxxx>
> Subject: [PATCH] blk-mq: move hctx lock/unlock into a helper
>
> Move the RCU vs SRCU logic into lock/unlock helpers, which makes
> the actual functional bits within the locked region much easier
> to read.
>
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>

Yeah, that's a lot better. It might also be a good idea to add
lockdep_assert_hctx_locked() for verification and documentation.

Thanks.

--
tejun