Message ID | 1518037339.2870.61.camel@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello, On Wed, Feb 07, 2018 at 09:02:21PM +0000, Bart Van Assche wrote: > The patch that I used in my test had an smp_wmb() call (see also below). Anyway, > I will see whether I can extract more state information through debugfs. > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index ef4f6df0f1df..8eb2105d82b7 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -827,13 +827,9 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved) > __blk_mq_complete_request(req); > break; > case BLK_EH_RESET_TIMER: > - /* > - * As nothing prevents from completion happening while > - * ->aborted_gstate is set, this may lead to ignored > - * completions and further spurious timeouts. > - */ > - blk_mq_rq_update_aborted_gstate(req, 0); > blk_add_timer(req); > + smp_wmb(); > + blk_mq_rq_update_aborted_gstate(req, 0); Without the matching rmb, just adding rmb won't do much but given the default strong ordering on x86 and other operations around, what you were seeing is probably not caused by lack of barriers. Thanks.
diff --git a/block/blk-mq.c b/block/blk-mq.c index ef4f6df0f1df..8eb2105d82b7 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -827,13 +827,9 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved) __blk_mq_complete_request(req); break; case BLK_EH_RESET_TIMER: - /* - * As nothing prevents from completion happening while - * ->aborted_gstate is set, this may lead to ignored - * completions and further spurious timeouts. - */ - blk_mq_rq_update_aborted_gstate(req, 0); blk_add_timer(req); + smp_wmb(); + blk_mq_rq_update_aborted_gstate(req, 0); break; case BLK_EH_NOT_HANDLED: break;