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

2018-05-13 Thread jianchao.wang
Hi Bart On 05/14/2018 12:03 PM, Bart Van Assche wrote: > On Mon, 2018-05-14 at 09:37 +0800, jianchao.wang wrote: >> In addition, on a 64bit system, how do you set up the timer with a 32bit >> deadline ? > > If timeout handling occurs less than (1 << 31) / HZ seconds after a request > has been

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

2018-05-13 Thread Bart Van Assche
On Mon, 2018-05-14 at 09:37 +0800, jianchao.wang wrote: > In addition, on a 64bit system, how do you set up the timer with a 32bit > deadline ? If timeout handling occurs less than (1 << 31) / HZ seconds after a request has been submitted then a 32-bit variable is sufficient to store the

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

2018-05-13 Thread jianchao.wang
Hi bart On 05/11/2018 11:29 PM, Bart Van Assche wrote: > On Fri, 2018-05-11 at 14:35 +0200, Christoph Hellwig wrote: >>> It should be due to union blk_deadline_and_state. >>> +union blk_deadline_and_state { >>> + struct { >>> + uint32_t generation:30; >>> + uint32_t

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

2018-05-13 Thread jianchao.wang
Hi Bart On 05/11/2018 11:26 PM, Bart Van Assche wrote: > The bug is in the above trace_printk() call: blk_rq_deadline() must only be > used > for the legacy block layer and not for blk-mq code. If you have a look at the > value > of the das.deadline field then one can see that the value of that