From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
Damien Le Moal <dlemoal@kernel.org>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 7/7] blk-mq: don't use the requeue list to queue flush commands
Date: Mon, 17 Apr 2023 06:26:46 +0200 [thread overview]
Message-ID: <20230417042646.GA32372@lst.de> (raw)
In-Reply-To: <ac7547c1-214a-7919-a95c-7bf8bc186e48@acm.org>
On Sun, Apr 16, 2023 at 02:01:30PM -0700, Bart Van Assche wrote:
> On 4/16/23 13:09, Christoph Hellwig wrote:
>> diff --git a/block/blk-flush.c b/block/blk-flush.c
>> index 69e9806f575455..231d3780e74ad1 100644
>> --- a/block/blk-flush.c
>> +++ b/block/blk-flush.c
>> @@ -188,7 +188,9 @@ static void blk_flush_complete_seq(struct request *rq,
>> case REQ_FSEQ_DATA:
>> list_move_tail(&rq->flush.list, &fq->flush_data_in_flight);
>> - blk_mq_add_to_requeue_list(rq, 0);
>> + spin_lock(&q->requeue_lock);
>> + list_add_tail(&rq->queuelist, &q->flush_list);
>> + spin_unlock(&q->requeue_lock);
>> blk_mq_kick_requeue_list(q);
>> break;
>
> At least the SCSI core can call blk_flush_complete_seq() from interrupt
> context so I don't think the above code is correct. The call chain is as
> follows:
All callers of blk_flush_complete_seq already disable interrupts when
taking mq_flush_lock. No need to disable interrupts again for a nested
lock then.
next prev parent reply other threads:[~2023-04-17 4:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 20:09 RFC: less special casing for flush requests Christoph Hellwig
2023-04-16 20:09 ` [PATCH 1/7] blk-mq: factor out a blk_rq_init_flush helper Christoph Hellwig
2023-04-17 6:22 ` Damien Le Moal
2023-04-17 6:24 ` Christoph Hellwig
2023-04-16 20:09 ` [PATCH 2/7] blk-mq: reflow blk_insert_flush Christoph Hellwig
2023-04-17 6:29 ` Damien Le Moal
2023-04-16 20:09 ` [PATCH 3/7] blk-mq: defer to the normal submission path for non-flush flush commands Christoph Hellwig
2023-04-17 6:31 ` Damien Le Moal
2023-04-17 19:48 ` Bart Van Assche
2023-04-16 20:09 ` [PATCH 4/7] blk-mq: also use the I/O scheduler for requests from the flush state machine Christoph Hellwig
2023-04-17 6:34 ` Damien Le Moal
2023-04-16 20:09 ` [PATCH 5/7] blk-mq: defer to the normal submission path for post-flush requests Christoph Hellwig
2023-04-17 6:36 ` Damien Le Moal
2023-04-17 6:39 ` Christoph Hellwig
2023-04-16 20:09 ` [PATCH 6/7] blk-mq: do not do head insertations post-pre-flush commands Christoph Hellwig
2023-04-17 6:38 ` Damien Le Moal
2023-04-17 19:51 ` Bart Van Assche
2023-04-16 20:09 ` [PATCH 7/7] blk-mq: don't use the requeue list to queue flush commands Christoph Hellwig
2023-04-16 21:01 ` Bart Van Assche
2023-04-17 4:26 ` Christoph Hellwig [this message]
2023-04-17 6:46 ` Damien Le Moal
2023-04-19 12:37 ` kernel test robot
2023-04-19 17:34 ` kernel test robot
2023-05-16 0:08 ` RFC: less special casing for flush requests Bart Van Assche
2023-05-16 4:03 ` Christoph Hellwig
2023-05-18 5:57 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2023-05-19 4:40 less special casing for flush requests v2 Christoph Hellwig
2023-05-19 4:40 ` [PATCH 7/7] blk-mq: don't use the requeue list to queue flush commands Christoph Hellwig
2023-05-19 19:55 ` Bart Van Assche
2023-05-20 4:56 ` Christoph Hellwig
2023-05-21 14:06 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417042646.GA32372@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dlemoal@kernel.org \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).