Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1601544
| From | Ming Lei <tom.leiming@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler |
| Date | 2017-03-15 17:50 +0100 |
| Message-ID | <tlkhz-1Qf-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <tlgdY-7yR-13@gated-at.bofh.it> <tlgdY-7yR-11@gated-at.bofh.it> <tlgxj-7FO-11@gated-at.bofh.it> <tljYd-1Jv-3@gated-at.bofh.it> <tljYd-1Jv-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Mar 16, 2017 at 12:22:01AM +0800, Ming Lei wrote: > On Wed, Mar 15, 2017 at 03:36:31PM +0000, Bart Van Assche wrote: > > OK, this race should only exist in case that the requeue happens after dispatch > busy, because COMPLETE flag isn't set. And if the requeue is from io completion, > no such race because COMPLETE flag is set. > > One solution I thought of is to call blk_mark_rq_complete() before requeuing > when dispatch busy happened, but that looks a bit silly. Another way is to > set STARTED flag just after .queue_rq returns BLK_MQ_RQ_QUEUE_OK, which looks > reasonable too. Any comments on the 2nd solution? Actually it isn't possible to happen because rq->deadline is just set in blk_mq_start_request() called from .queue_rq, and it won't trigger timeout handling even STARTED is observed as true in blk_mq_check_expired() because timeout period is often set as big enough. So it is still safe, isn't it? But this situation should have been commented. Thanks, Ming
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-15 13:30 +0100
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-15 13:50 +0100
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-15 17:30 +0100
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-15 17:50 +0100
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-16 01:10 +0100
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-17 01:10 +0100
Re: [PATCH 1/2] blk-mq: don't complete un-started request in timeout handler Ming Lei <tom.leiming@gmail.com> - 2017-03-16 00:50 +0100
csiph-web