Thread (16 messages) 16 messages, 3 authors, 2021-10-13

Re: [PATCH V3 6/6] blk-mq: support concurrent queue quiesce/unquiesce

From: Ming Lei <hidden>
Date: 2021-10-12 15:07:09
Also in: linux-nvme

On Tue, Oct 12, 2021 at 12:30:10PM +0200, Christoph Hellwig wrote:
On Sat, Oct 09, 2021 at 11:47:13AM +0800, Ming Lei wrote:
quoted
+	spin_lock_irqsave(&q->queue_lock, flags);
+	if (!q->quiesce_depth++)
+		blk_queue_flag_set(QUEUE_FLAG_QUIESCED, q);
We can get rid of the QUEUE_FLAG_QUIESCED flag now and just look
at ->quiesce_depth directly.
I'd rather not to do that given we need to check QUEUE_FLAG_QUIESCED in fast
path.
quoted
+	spin_lock_irqsave(&q->queue_lock, flags);
+	WARN_ON_ONCE(q->quiesce_depth <= 0);
+	if (q->quiesce_depth > 0 && !--q->quiesce_depth) {
	if (WARN_ON_ONCE(q->quiesce_depth <= 0))
		; /* oops */
	else if (!--q->quiesce_depth)
		run_queue = true;
OK.


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