On 8/28/22 20:25, gumi@xxxxxxxxxxxxxxxxx wrote:
This problem occurs on kernel version 5.10, and i read this commit
you mentioned. The problem I observed is not a problem of req re-used
fixed by commit 2e315dc07df0, but a different problem. The specific
scene is this: A new IO has called blk_mq_start_request() to start
sending, and an instruction out of sequence occurs between
blk_add_timer() and WRITE_ONCE(rq->state,MQ_RQ_IN_FLIGHT) in
blk_mq_start_request(), so the req->state is set to MQ_RQ_IN_FLIGHT,
but req->deadline still 0, and at this very moment, timeout
handler(blk_mq_check_expired()) check if this new IO times out, this
condition(if (time_after_eq(jiffies, deadline)) in
blk_mq_req_expired() called by blk_mq_check_expired()) will is true.
The end result is that this new IO is considered to have timed out. I
looked at the latest kernel code and the problem persists, do you
agree with my analysis process?
It seems unlikely to me that the above analysis is correct. If this
problem would occur with recent kernel versions, I think that it would
already have been reported by other Linux users.
Thanks,
Bart.