* Re: [PATCHSET v3] blk-mq: reimplement timeout handling [not found] ` <20171229100239.GA4020@infradead.org> @ 2018-01-08 17:03 ` Tejun Heo 0 siblings, 0 replies; 3+ messages in thread From: Tejun Heo @ 2018-01-08 17:03 UTC (permalink / raw) To: Christoph Hellwig Cc: jack, axboe, clm, jbacik, kernel-team, linux-kernel, linux-btrfs, peterz, jianchao.w.wang, Bart.VanAssche On Fri, Dec 29, 2017 at 02:02:39AM -0800, Christoph Hellwig wrote: > This seems to miss the linux-block list once again. Please include > it in the next resend. Sorry about that. Copy/pasted from the older thread without thinking. Thanks. -- tejun ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20171216120726.517153-2-tj@kernel.org>]
[parent not found: <20171229100418.GB4020@infradead.org>]
* Re: [PATCH 1/7] blk-mq: protect completion path with RCU [not found] ` <20171229100418.GB4020@infradead.org> @ 2018-01-08 17:12 ` Tejun Heo 0 siblings, 0 replies; 3+ messages in thread From: Tejun Heo @ 2018-01-08 17:12 UTC (permalink / raw) To: Christoph Hellwig Cc: jack, axboe, clm, jbacik, kernel-team, linux-kernel, linux-btrfs, peterz, jianchao.w.wang, Bart.VanAssche Hello, Christoph. On Fri, Dec 29, 2017 at 02:04:18AM -0800, Christoph Hellwig wrote: > Why do you need the srcu protection? The completion path can never > sleep. > > If there is a good reason to keep it please add commment, and > make the srcu variant a separate function only used by drivers that > need it instead of adding the conditional. It's either that or adding protection against both srcu and rcu in the counterpart. It's easier / cleaner to just use single rcu construct for a given queue. Will add a comment. Jens already has a patch which factors out the conditionals. Thanks. -- tejun ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20171216120726.517153-6-tj@kernel.org>]
[parent not found: <64dfa760-d433-1537-9bc6-b12cda3c9dc6@oracle.com>]
[parent not found: <20171221135051.GE1084507@devbig577.frc2.facebook.com>]
[parent not found: <4e5aa629-f341-d077-961b-c778ceb31154@oracle.com>]
* Re: [PATCH 5/7] blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq [not found] ` <4e5aa629-f341-d077-961b-c778ceb31154@oracle.com> @ 2018-01-08 17:27 ` Tejun Heo 0 siblings, 0 replies; 3+ messages in thread From: Tejun Heo @ 2018-01-08 17:27 UTC (permalink / raw) To: jianchao.wang Cc: jbacik, jack, axboe, clm, kernel-team, linux-kernel, linux-btrfs, peterz, Bart.VanAssche Hello, Jianchao. On Fri, Dec 22, 2017 at 12:02:20PM +0800, jianchao.wang wrote: > > On Thu, Dec 21, 2017 at 11:56:49AM +0800, jianchao.wang wrote: > >> It's worrying that even though the blk_mark_rq_complete() here is > >> intended to synchronize with timeout path, but it indeed give the > >> blk_mq_complete_request() the capability to exclude with > > There could be scenario where the driver itself stop a request > itself with blk_mq_complete_request() or some other interface that > will invoke it, races with the normal completion path where a same > request comes. But what'd prevent the completion reinitializing the request and then the actual completion path coming in and completing the request again? > For example: > a reset could be triggered through sysfs on nvme-rdma > Then the driver will cancel all the reqs, including in-flight ones. > nvme_rdma_reset_ctrl_work() > nvme_rdma_shutdown_ctrl() > >>>> > if (ctrl->ctrl.queue_count > 1) { > nvme_stop_queues(&ctrl->ctrl); //quiesce the queue > blk_mq_tagset_busy_iter(&ctrl->tag_set, > nvme_cancel_request, &ctrl->ctrl); //invoke blk_mq_complete_request() > nvme_rdma_destroy_io_queues(ctrl, shutdown); > } > >>>> > > These operations could race with the normal completion path of in-flight ones. > It should drain all the in-flight ones first here. But there maybe some other > places similar with this. If there are any such places, they should be using an interface which is propelry synchronized like blk_abort_request(), which btw is what libata already does. Otherwise, it's racy with or without these patches. Thanks. -- tejun ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-08 17:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20171216120726.517153-1-tj@kernel.org>
[not found] ` <20171229100239.GA4020@infradead.org>
2018-01-08 17:03 ` [PATCHSET v3] blk-mq: reimplement timeout handling Tejun Heo
[not found] ` <20171216120726.517153-2-tj@kernel.org>
[not found] ` <20171229100418.GB4020@infradead.org>
2018-01-08 17:12 ` [PATCH 1/7] blk-mq: protect completion path with RCU Tejun Heo
[not found] ` <20171216120726.517153-6-tj@kernel.org>
[not found] ` <64dfa760-d433-1537-9bc6-b12cda3c9dc6@oracle.com>
[not found] ` <20171221135051.GE1084507@devbig577.frc2.facebook.com>
[not found] ` <4e5aa629-f341-d077-961b-c778ceb31154@oracle.com>
2018-01-08 17:27 ` [PATCH 5/7] blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).