Thread (37 messages) 37 messages, 6 authors, 2017-12-21

Re: [PATCH 2/6] blk-mq: replace timeout synchronization with a RCU and generation based scheme

From: "tj@kernel.org" <tj@kernel.org>
Date: 2017-12-12 21:44:38
Also in: lkml

Hello, Bart.

On Tue, Dec 12, 2017 at 09:37:11PM +0000, Bart Van Assche wrote:
Have you considered the following instead of introducing MQ_RQ_IDLE and
MQ_RQ_IN_FLIGHT? I think this could help to limit the number of new atomic
operations introduced in the hot path by this patch series.
But nothing in the hot paths is atomic.
static inline bool blk_mq_rq_in_flight(struct request *rq)
{
	return list_empty(&rq->queuelist);
}
And the fact that we encode the generation number and state into a
single variable contributes to not needing atomic operations.
Breaking up the state and generation like the above would need more
synchronization, not less.

Thanks.

-- 
tejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help