diff mbox series

block: queue data commands from the flush state machine at the head

Message ID 20230714143014.11879-1-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series block: queue data commands from the flush state machine at the head | expand

Commit Message

Christoph Hellwig July 14, 2023, 2:30 p.m. UTC
We used to insert the data commands following a pre-flush to the head
of the queue until commit 1e82fadfc6b ("blk-mq: do not do head insertions
post-pre-flush commands").  Not doing this seems to cause hangs of
such commands on NFS workloads when exported from file systems with
SATA SSDs.  I have no idea why this would starve these workloads,
but doing a semantic revert of this patch (which looks quite different
due to various other changes) fixes the hangs.

Fixes: 1e82fadfc6b ("blk-mq: do not do head insertions post-pre-flush commands")
Reported-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
---
 block/blk-flush.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe July 14, 2023, 2:43 p.m. UTC | #1
On Fri, 14 Jul 2023 16:30:14 +0200, Christoph Hellwig wrote:
> We used to insert the data commands following a pre-flush to the head
> of the queue until commit 1e82fadfc6b ("blk-mq: do not do head insertions
> post-pre-flush commands").  Not doing this seems to cause hangs of
> such commands on NFS workloads when exported from file systems with
> SATA SSDs.  I have no idea why this would starve these workloads,
> but doing a semantic revert of this patch (which looks quite different
> due to various other changes) fixes the hangs.
> 
> [...]

Applied, thanks!

[1/1] block: queue data commands from the flush state machine at the head
      commit: 9f87fc4d72f52b26ac3e19df5e4584227fe6740c

Best regards,
diff mbox series

Patch

diff --git a/block/blk-flush.c b/block/blk-flush.c
index dba392cf22bec6..8220517c2d67da 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -189,7 +189,7 @@  static void blk_flush_complete_seq(struct request *rq,
 	case REQ_FSEQ_DATA:
 		list_move_tail(&rq->flush.list, &fq->flush_data_in_flight);
 		spin_lock(&q->requeue_lock);
-		list_add_tail(&rq->queuelist, &q->flush_list);
+		list_add(&rq->queuelist, &q->requeue_list);
 		spin_unlock(&q->requeue_lock);
 		blk_mq_kick_requeue_list(q);
 		break;