From: Ming Lei <ming.lei@redhat.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Thomas Gleixner <tglx@linutronix.de>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] blk-mq: Remove get_cpu() in __blk_mq_delay_run_hw_queue().
Date: Tue, 15 Feb 2022 20:22:43 +0800 [thread overview]
Message-ID: <YgubE76UZr5S7SY7@T590> (raw)
In-Reply-To: <YguYbC0540CecccG@linutronix.de>
On Tue, Feb 15, 2022 at 01:11:24PM +0100, Sebastian Andrzej Siewior wrote:
> On 2022-02-15 19:58:03 [+0800], Ming Lei wrote:
> > On Tue, Feb 15, 2022 at 10:31:49AM +0100, Sebastian Andrzej Siewior wrote:
> > > On 2022-02-15 17:23:45 [+0800], Ming Lei wrote:
> > > > > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > > > > index 1adfe4824ef5e..90217f1b09add 100644
> > > > > --- a/block/blk-mq.c
> > > > > +++ b/block/blk-mq.c
> > > > > @@ -2040,14 +2040,10 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
> > > > > return;
> > > > >
> > > > > if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) {
> > > > > - int cpu = get_cpu();
> > > >
> > > > Did you observe the warning triggered? might_sleep_if(true) in
> > > > __blk_mq_run_dispatch_ops() is only supposed to be run in case of
> > > > (hctx->flags & BLK_MQ_F_BLOCKING).
> > >
> > > I haven't seen it triggering but if that call chain is possible then it
> > > will triggert due to get_cpu().
> >
> > As I mentioned, the call chain isn't possible.
>
> Why not? Is BLK_MQ_F_BLOCKING and blk_queue_has_srcu() exclusive?
blk_queue_has_srcu() returns true iff BLK_MQ_F_BLOCKING is set.
thanks,
Ming
prev parent reply other threads:[~2022-02-15 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 9:11 [PATCH] blk-mq: Remove get_cpu() in __blk_mq_delay_run_hw_queue() Sebastian Andrzej Siewior
2022-02-15 9:23 ` Ming Lei
2022-02-15 9:31 ` Sebastian Andrzej Siewior
2022-02-15 11:58 ` Ming Lei
2022-02-15 12:11 ` Sebastian Andrzej Siewior
2022-02-15 12:22 ` Ming Lei [this message]
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=YgubE76UZr5S7SY7@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bigeasy@linutronix.de \
--cc=linux-block@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.