All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"israelr@mellanox.com" <israelr@mellanox.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>, "hch@lst.de" <hch@lst.de>,
	"sebott@linux.ibm.com" <sebott@linux.ibm.com>,
	"ming.lei@redhat.com" <ming.lei@redhat.com>,
	"jianchao.w.wang@oracle.com" <jianchao.w.wang@oracle.com>,
	"maxg@mellanox.com" <maxg@mellanox.com>,
	"tj@kernel.org" <tj@kernel.org>,
	"keith.busch@intel.com" <keith.busch@intel.com>
Subject: Re: [PATCH v13] blk-mq: Rework blk-mq timeout handling again
Date: Tue, 22 May 2018 15:03:01 -0600	[thread overview]
Message-ID: <be80fd24-0f9f-ebe0-17cf-8db2cb9a4c82@kernel.dk> (raw)
In-Reply-To: <2c0c013717470bb9d5f97ec0559e7081c1e152de.camel@wdc.com>

On 5/22/18 2:44 PM, Bart Van Assche wrote:
> On Tue, 2018-05-22 at 14:38 -0600, Jens Axboe wrote:
>> On 5/22/18 2:33 PM, Bart Van Assche wrote:
>>> Thanks for having reported this. How about using the following change to suppress
>>> that warning:
>>>
>>> diff --git a/block/blk-mq.c b/block/blk-mq.c
>>> index bb99c03e7a34..84e55ea55baf 100644
>>> --- a/block/blk-mq.c
>>> +++ b/block/blk-mq.c
>>> @@ -844,6 +844,7 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
>>>  
>>>  	switch (ret) {
>>>  	case BLK_EH_HANDLED:
>>> +		blk_mq_change_rq_state(req, MQ_RQ_TIMED_OUT, MQ_RQ_COMPLETE);
>>>  		__blk_mq_complete_request(req);
>>>  		break;
>>>  	case BLK_EH_RESET_TIMER:
>>>
>>> I think this will work better than what was proposed in your last e-mail. I'm afraid
>>> that with that change that a completion that occurs while the timeout handler is
>>> running can be ignored.
>>
>> What if that races with eg requeue? We get the completion from IRQ, decide we
>> need to requeue/restart the request rather than complete it.
> 
> Shouldn't block drivers that requeue a request from inside their timeout handler
> return BLK_EH_NOT_HANDLED instead of BLK_EH_HANDLED?

Yeah, I guess they should. See reply to Christoph as well, making this
simpler would be a great idea. Could be done as a prep patch (series)
to this one.

-- 
Jens Axboe

  reply	other threads:[~2018-05-22 21:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 16:25 [PATCH v13] blk-mq: Rework blk-mq timeout handling again Bart Van Assche
2018-05-22 16:44 ` Jens Axboe
2018-05-22 17:17   ` Jens Axboe
2018-05-22 18:47     ` Jens Axboe
2018-05-22 19:03       ` Jens Axboe
2018-05-22 19:38         ` Jens Axboe
2018-05-22 20:26           ` Keith Busch
2018-05-22 20:29             ` Jens Axboe
2018-05-22 21:02               ` Christoph Hellwig
2018-05-22 21:02                 ` Jens Axboe
2018-05-22 20:33           ` Bart Van Assche
2018-05-22 20:38             ` Jens Axboe
2018-05-22 20:44               ` Bart Van Assche
2018-05-22 21:03                 ` Jens Axboe [this message]
2018-05-23  2:35               ` Ming Lei
2018-05-22 20:33 ` Keith Busch
2018-05-22 20:36   ` Bart Van Assche
2018-05-22 20:40     ` Keith Busch
2018-05-22 20:44     ` Keith Busch
2018-05-22 20:47       ` Bart Van Assche
2018-05-23 14:02 ` Keith Busch
2018-05-23 14:08   ` Keith Busch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be80fd24-0f9f-ebe0-17cf-8db2cb9a4c82@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Bart.VanAssche@wdc.com \
    --cc=hch@lst.de \
    --cc=israelr@mellanox.com \
    --cc=jianchao.w.wang@oracle.com \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=maxg@mellanox.com \
    --cc=ming.lei@redhat.com \
    --cc=sagi@grimberg.me \
    --cc=sebott@linux.ibm.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.