Re: [PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-14 Thread t...@kernel.org
On Thu, Dec 14, 2017 at 05:01:06PM +, Bart Van Assche wrote: > On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > > + } else { > > + srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); > > + if (!blk_mark_rq_complete(rq)) > > + __blk_mq_complete_request(rq

Re: [PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-14 Thread Bart Van Assche
On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > + } else { > + srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); > + if (!blk_mark_rq_complete(rq)) > + __blk_mq_complete_request(rq); > + srcu_read_unlock(hctx->queue_rq_srcu, srcu_idx);

Re: [PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-13 Thread jianchao.wang
On 12/14/2017 12:13 AM, Tejun Heo wrote: > Hello, > > On Wed, Dec 13, 2017 at 11:30:48AM +0800, jianchao.wang wrote: >>> + } else { >>> + srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); >>> + if (!blk_mark_rq_complete(rq)) >>> + __blk_mq_complete_request(r

Re: [PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-13 Thread Tejun Heo
Hello, On Wed, Dec 13, 2017 at 11:30:48AM +0800, jianchao.wang wrote: > > + } else { > > + srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); > > + if (!blk_mark_rq_complete(rq)) > > + __blk_mq_complete_request(rq); > > + srcu_read_unlock(hctx->queue_

Re: [PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-12 Thread jianchao.wang
Hello tejun Sorry for missing the V2, same comment again. On 12/13/2017 03:01 AM, Tejun Heo wrote: > Currently, blk-mq protects only the issue path with RCU. This patch > puts the completion path under the same RCU protection. This will be > used to synchronize issue/completion against timeout

Re: [PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-12 Thread jianchao.wang
Hi tejun On 12/10/2017 03:25 AM, Tejun Heo wrote: > Currently, blk-mq protects only the issue path with RCU. This patch > puts the completion path under the same RCU protection. This will be > used to synchronize issue/completion against timeout by later patches, > which will also add the commen

[PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-12 Thread Tejun Heo
Currently, blk-mq protects only the issue path with RCU. This patch puts the completion path under the same RCU protection. This will be used to synchronize issue/completion against timeout by later patches, which will also add the comments. Signed-off-by: Tejun Heo --- block/blk-mq.c | 16 +++

[PATCH 1/6] blk-mq: protect completion path with RCU

2017-12-09 Thread Tejun Heo
Currently, blk-mq protects only the issue path with RCU. This patch puts the completion path under the same RCU protection. This will be used to synchronize issue/completion against timeout by later patches, which will also add the comments. Signed-off-by: Tejun Heo --- block/blk-mq.c | 16 +++