From: Ming Lei <ming.lei@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, John Garry <john.garry@huawei.com>,
Bart Van Assche <bvanassche@acm.org>,
Hannes Reinecke <hare@suse.com>, Christoph Hellwig <hch@lst.de>,
Thomas Gleixner <tglx@linutronix.de>,
Keith Busch <keith.busch@intel.com>
Subject: Re: [PATCH V2 RESEND 3/5] blk-mq: stop to handle IO before hctx's all CPUs become offline
Date: Mon, 7 Oct 2019 23:01:02 +0800 [thread overview]
Message-ID: <20191007150101.GA1668@ming.t460p> (raw)
In-Reply-To: <efd6edfa-cde1-7ad3-d04f-1204770e6b42@suse.de>
On Mon, Oct 07, 2019 at 08:23:29AM +0200, Hannes Reinecke wrote:
> On 10/6/19 4:45 AM, Ming Lei wrote:
> > Most of blk-mq drivers depend on managed IRQ's auto-affinity to setup
> > up queue mapping. Thomas mentioned the following point[1]:
> >
> > "
> > That was the constraint of managed interrupts from the very beginning:
> >
> > The driver/subsystem has to quiesce the interrupt line and the associated
> > queue _before_ it gets shutdown in CPU unplug and not fiddle with it
> > until it's restarted by the core when the CPU is plugged in again.
> > "
> >
> > However, current blk-mq implementation doesn't quiesce hw queue before
> > the last CPU in the hctx is shutdown. Even worse, CPUHP_BLK_MQ_DEAD is
> > one cpuhp state handled after the CPU is down, so there isn't any chance
> > to quiesce hctx for blk-mq wrt. CPU hotplug.
> >
> > Add new cpuhp state of CPUHP_AP_BLK_MQ_ONLINE for blk-mq to stop queues
> > and wait for completion of in-flight requests.
> >
> > [1] https://lore.kernel.org/linux-block/alpine.DEB.2.21.1904051331270.1802@nanos.tec.linutronix.de/
> >
> > Cc: Bart Van Assche <bvanassche@acm.org>
> > Cc: Hannes Reinecke <hare@suse.com>
> > Cc: Christoph Hellwig <hch@lst.de>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Keith Busch <keith.busch@intel.com>
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> > ---
> > block/blk-mq-tag.c | 2 +-
> > block/blk-mq-tag.h | 2 ++
> > block/blk-mq.c | 65 ++++++++++++++++++++++++++++++++++++++
> > include/linux/blk-mq.h | 1 +
> > include/linux/cpuhotplug.h | 1 +
> > 5 files changed, 70 insertions(+), 1 deletion(-)
> >
> I really don't like the zillions of 'XXX_in_flight()' helper in blk-mq;
> blk_mq_queue_inflight(), blk_mq_in_flight(), blk_mq_in_flight_rw() et al.
> Can't you implement your one on top of the already existing?
This one returns in-flight rqs on specific tags(hctx), so far no such
kind of interface, that is why blk_mq_all_tag_busy_iter is exported out
in this patch.
Thanks,
Ming
next prev parent reply other threads:[~2019-10-07 15:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-06 2:45 [PATCH V2 RESEND 0/5] blk-mq: improvement on handling IO during CPU hotplug Ming Lei
2019-10-06 2:45 ` [PATCH V2 RESEND 1/5] blk-mq: add new state of BLK_MQ_S_INTERNAL_STOPPED Ming Lei
2019-10-07 6:02 ` Hannes Reinecke
2019-10-06 2:45 ` [PATCH V2 RESEND 2/5] blk-mq: add blk-mq flag of BLK_MQ_F_NO_MANAGED_IRQ Ming Lei
2019-10-07 6:06 ` Hannes Reinecke
2019-10-06 2:45 ` [PATCH V2 RESEND 3/5] blk-mq: stop to handle IO before hctx's all CPUs become offline Ming Lei
2019-10-07 6:23 ` Hannes Reinecke
2019-10-07 15:01 ` Ming Lei [this message]
2019-10-07 10:23 ` John Garry
2019-10-07 15:04 ` Ming Lei
2019-10-07 16:49 ` John Garry
2019-10-06 2:45 ` [PATCH V2 RESEND 4/5] blk-mq: re-submit IO in case that hctx is dead Ming Lei
2019-10-07 6:27 ` Hannes Reinecke
2019-10-07 15:05 ` Ming Lei
2019-10-06 2:45 ` [PATCH V2 RESEND 5/5] blk-mq: handle requests dispatched from IO scheduler " Ming Lei
2019-10-07 6:28 ` Hannes Reinecke
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=20191007150101.GA1668@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=john.garry@huawei.com \
--cc=keith.busch@intel.com \
--cc=linux-block@vger.kernel.org \
--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 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).