All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, John Garry <john.garry@huawei.com>,
	Hannes Reinecke <hare@suse.com>, Christoph Hellwig <hch@lst.de>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH V10 06/11] blk-mq: prepare for draining IO when hctx's all CPUs are offline
Date: Sat, 9 May 2020 11:56:09 +0800	[thread overview]
Message-ID: <20200509035609.GF1392681@T590> (raw)
In-Reply-To: <d59e0c74-981d-6ed4-e80d-09b0cd4c17db@acm.org>

On Fri, May 08, 2020 at 08:11:55PM -0700, Bart Van Assche wrote:
> On 2020-05-08 19:09, Ming Lei wrote:
> > On Fri, May 08, 2020 at 04:26:17PM -0700, Bart Van Assche wrote:
> >> On 2020-05-04 19:09, Ming Lei wrote:
> >>> @@ -391,6 +393,7 @@ struct blk_mq_ops {
> >>>  enum {
> >>>  	BLK_MQ_F_SHOULD_MERGE	= 1 << 0,
> >>>  	BLK_MQ_F_TAG_SHARED	= 1 << 1,
> >>> +	BLK_MQ_F_NO_MANAGED_IRQ	= 1 << 2,
> >>>  	BLK_MQ_F_BLOCKING	= 1 << 5,
> >>>  	BLK_MQ_F_NO_SCHED	= 1 << 6,
> >>>  	BLK_MQ_F_ALLOC_POLICY_START_BIT = 8,
> >>> diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
> >>> index 77d70b633531..24b3a77810b6 100644
> >>> --- a/include/linux/cpuhotplug.h
> >>> +++ b/include/linux/cpuhotplug.h
> >>> @@ -152,6 +152,7 @@ enum cpuhp_state {
> >>>  	CPUHP_AP_SMPBOOT_THREADS,
> >>>  	CPUHP_AP_X86_VDSO_VMA_ONLINE,
> >>>  	CPUHP_AP_IRQ_AFFINITY_ONLINE,
> >>> +	CPUHP_AP_BLK_MQ_ONLINE,
> >>>  	CPUHP_AP_ARM_MVEBU_SYNC_CLOCKS,
> >>>  	CPUHP_AP_X86_INTEL_EPB_ONLINE,
> >>>  	CPUHP_AP_PERF_ONLINE,
> >>
> >> Wouldn't BLK_MQ_F_NO_IRQ be a better name than BLK_MQ_F_NO_MANAGED_IRQ?
> > 
> > No, what this patchset tries to do is to address request timeout or hang
> > issue in case that managed irq is applied in blk-mq driver.
> 
> What is a managed IRQ? The following query did not produce a useful answer:
> 
> $ git grep -nHi managed.irq

[ming@T590 linux]$ git grep -n MANAGED ./kernel/irq
kernel/irq/chip.c:188:  IRQ_STARTUP_MANAGED,
kernel/irq/chip.c:226:  return IRQ_STARTUP_MANAGED;
kernel/irq/chip.c:271:          case IRQ_STARTUP_MANAGED:
kernel/irq/cpuhotplug.c:179:    if (!housekeeping_enabled(HK_FLAG_MANAGED_IRQ))
kernel/irq/cpuhotplug.c:182:    hk_mask = housekeeping_cpumask(HK_FLAG_MANAGED_IRQ);
kernel/irq/debugfs.c:114:       BIT_MASK_DESCR(IRQD_AFFINITY_MANAGED),
kernel/irq/debugfs.c:115:       BIT_MASK_DESCR(IRQD_MANAGED_SHUTDOWN),
kernel/irq/internals.h:215:     __irqd_to_state(d) |= IRQD_MANAGED_SHUTDOWN;
kernel/irq/internals.h:220:     __irqd_to_state(d) &= ~IRQD_MANAGED_SHUTDOWN;
kernel/irq/irqdesc.c:487:                               flags = IRQD_AFFINITY_MANAGED |
kernel/irq/irqdesc.c:488:                                       IRQD_MANAGED_SHUTDOWN;
kernel/irq/manage.c:170: * AFFINITY_MANAGED flag.
kernel/irq/manage.c:241:            housekeeping_enabled(HK_FLAG_MANAGED_IRQ)) {
kernel/irq/manage.c:247:                hk_mask = housekeeping_cpumask(HK_FLAG_MANAGED_IRQ);

The exact name should be AFFINITY_MANAGED, however the name of managed
irq has been used in commit log and isolation cpus code for a bit long.

OK, I will add comment on BLK_MQ_F_NO_MANAGED_IRQ a bit in next version.

Thanks, 
Ming


  reply	other threads:[~2020-05-09  3:56 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  2:09 [PATCH V10 00/11] blk-mq: improvement CPU hotplug Ming Lei
2020-05-05  2:09 ` [PATCH V10 01/11] block: clone nr_integrity_segments and write_hint in blk_rq_prep_clone Ming Lei
2020-05-05  2:09 ` [PATCH V10 02/11] block: add helper for copying request Ming Lei
2020-05-05  2:09 ` [PATCH V10 03/11] blk-mq: mark blk_mq_get_driver_tag as static Ming Lei
2020-05-05  2:09 ` [PATCH V10 04/11] blk-mq: assign rq->tag in blk_mq_get_driver_tag Ming Lei
2020-05-05  2:09 ` [PATCH V10 05/11] blk-mq: support rq filter callback when iterating rqs Ming Lei
2020-05-08 23:32   ` Bart Van Assche
2020-05-09  0:18     ` Bart Van Assche
2020-05-09  2:05       ` Ming Lei
2020-05-09  3:08         ` Bart Van Assche
2020-05-09  3:52           ` Ming Lei
2020-05-05  2:09 ` [PATCH V10 06/11] blk-mq: prepare for draining IO when hctx's all CPUs are offline Ming Lei
2020-05-05  6:14   ` Hannes Reinecke
2020-05-08 23:26   ` Bart Van Assche
2020-05-09  2:09     ` Ming Lei
2020-05-09  3:11       ` Bart Van Assche
2020-05-09  3:56         ` Ming Lei [this message]
2020-05-05  2:09 ` [PATCH V10 07/11] blk-mq: stop to handle IO and drain IO before hctx becomes inactive Ming Lei
2020-05-08 23:39   ` Bart Van Assche
2020-05-09  2:20     ` Ming Lei
2020-05-09  3:24       ` Bart Van Assche
2020-05-09  4:10         ` Ming Lei
2020-05-09 14:18           ` Bart Van Assche
2020-05-11  1:45             ` Ming Lei
2020-05-11  3:20               ` Bart Van Assche
2020-05-11  3:48                 ` Ming Lei
2020-05-11 20:56                   ` Bart Van Assche
2020-05-12  1:25                     ` Ming Lei
2020-05-05  2:09 ` [PATCH V10 08/11] block: add blk_end_flush_machinery Ming Lei
2020-05-05  2:09 ` [PATCH V10 09/11] blk-mq: add blk_mq_hctx_handle_dead_cpu for handling cpu dead Ming Lei
2020-05-05  2:09 ` [PATCH V10 10/11] blk-mq: re-submit IO in case that hctx is inactive Ming Lei
2020-05-05  2:09 ` [PATCH V10 11/11] block: deactivate hctx when the hctx is actually inactive Ming Lei
2020-05-09 14:07   ` Bart Van Assche
2020-05-11  2:11     ` Ming Lei
2020-05-11  3:30       ` Bart Van Assche
2020-05-11  4:08         ` Ming Lei
2020-05-11 20:52           ` Bart Van Assche
2020-05-12  1:43             ` Ming Lei
2020-05-12  2:08             ` Ming Lei
2020-05-08 21:49 ` [PATCH V10 00/11] blk-mq: improvement CPU hotplug Ming Lei
2020-05-09  3:17   ` Jens Axboe

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=20200509035609.GF1392681@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=john.garry@huawei.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 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.