Re: [PATCH v8] blk-mq: Rework blk-mq timeout handling again

2018-05-11 Thread Bart Van Assche
On Fri, 2018-05-11 at 15:21 -0600, Jens Axboe wrote: > On 5/11/18 3:08 PM, Bart Van Assche wrote: > blk_mq_rq_update_aborted_gstate(rq, gstate); > > + union blk_deadline_and_state das = READ_ONCE(rq->das); > > + unsigned long now = jiffies; > > + int32_t diff_jiffies = das.deadline - now; >

Re: [PATCH v8] blk-mq: Rework blk-mq timeout handling again

2018-05-11 Thread Jens Axboe
On 5/11/18 3:08 PM, Bart Van Assche wrote: blk_mq_rq_update_aborted_gstate(rq, gstate); > + union blk_deadline_and_state das = READ_ONCE(rq->das); > + unsigned long now = jiffies; > + int32_t diff_jiffies = das.deadline - now; > + int32_t diff_next = das.deadline - data->next; > +

[PATCH v8] blk-mq: Rework blk-mq timeout handling again

2018-05-11 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