Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 19:31 +0200, h...@lst.de wrote: > On Wed, May 16, 2018 at 04:47:54PM +, Bart Van Assche wrote: > > I think your patch changes the order of changing the request state and > > calling mod_timer(). In my patch the request state and the deadline are > > updated first and

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread h...@lst.de
On Wed, May 16, 2018 at 04:47:54PM +, Bart Van Assche wrote: > I think your patch changes the order of changing the request state and > calling mod_timer(). In my patch the request state and the deadline are > updated first and mod_timer() is called afterwards. I think your patch > changes the

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 18:24 +0200, h...@lst.de wrote: > On Wed, May 16, 2018 at 04:17:42PM +, Bart Van Assche wrote: > > There is another reason the deadline is included in the atomic operation, > > namely to handle races between the BLK_EH_RESET_TIMER case in > > blk_mq_rq_timed_out() > >

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread h...@lst.de
On Wed, May 16, 2018 at 04:17:42PM +, Bart Van Assche wrote: > There is another reason the deadline is included in the atomic operation, > namely to handle races between the BLK_EH_RESET_TIMER case in > blk_mq_rq_timed_out() > and blk_mq_complete_request(). I don't think that race is

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Bart Van Assche
On Wed, 2018-05-16 at 14:51 +0200, Christoph Hellwig wrote: > I've been looking at this carefully, and I don't think we need cmpxchg64 > at all, and we don't need anywhere near as many cmpxchg operations either. > > The only reason to include the deadline in the atomic operation is the >

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-16 Thread Christoph Hellwig
I've been looking at this carefully, and I don't think we need cmpxchg64 at all, and we don't need anywhere near as many cmpxchg operations either. The only reason to include the deadline in the atomic operation is the blk_abort_request case, as the blk_mq_add_timer never modifies the deadline of

Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-15 Thread Sebastian Ott
On Mon, 14 May 2018, Bart Van Assche wrote: > Recently the blk-mq timeout handling code was reworked. See also Tejun > Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 > (https://www.mail-archive.com/linux-block@vger.kernel.org/msg16985.html). > This patch reworks the blk-mq

[PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again

2018-05-14 Thread Bart Van Assche
Recently the blk-mq timeout handling code was reworked. See also Tejun Heo, "[PATCHSET v4] blk-mq: reimplement timeout handling", 08 Jan 2018 (https://www.mail-archive.com/linux-block@vger.kernel.org/msg16985.html). This patch reworks the blk-mq timeout handling code again. The timeout handling