Re: [PATCH 5/7] blk-mq: remove REQ_ATOM_COMPLETE usages from blk-mq
From: Tejun Heo
Date: Thu Dec 21 2017 - 08:51:02 EST
Hello,
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
> itself. Maybe this capability should be reserved.
Can you explain further how that'd help? The problem there is that if
you have two competing completions, where one isn't a timeout, there's
nothing synchronizing the reuse of the request. IOW, the losing one
can easily complete the next recycle instance. The atomic bitops
might feel like more protection but it's just feels.
Thanks.
--
tejun