[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190827143516.GB23091@localhost.localdomain>
Date: Tue, 27 Aug 2019 08:35:16 -0600
From: Keith Busch <kbusch@...nel.org>
To: Ming Lei <ming.lei@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
Long Li <longli@...rosoft.com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Keith Busch <keith.busch@...el.com>, Jens Axboe <axboe@...com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
John Garry <john.garry@...wei.com>,
Hannes Reinecke <hare@...e.com>,
linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH 4/4] genirq: use irq's affinity for threaded irq with
IRQF_RESCUE_THREAD
On Tue, Aug 27, 2019 at 04:53:44PM +0800, Ming Lei wrote:
> In case of IRQF_RESCUE_THREAD, the threaded handler is only used to
> handle interrupt when IRQ flood comes, use irq's affinity for this thread
> so that scheduler may select other not too busy CPUs for handling the
> interrupt.
>
> Cc: Long Li <longli@...rosoft.com>
> Cc: Ingo Molnar <mingo@...hat.com>,
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Keith Busch <keith.busch@...el.com>
> Cc: Jens Axboe <axboe@...com>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Sagi Grimberg <sagi@...mberg.me>
> Cc: John Garry <john.garry@...wei.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Hannes Reinecke <hare@...e.com>
> Cc: linux-nvme@...ts.infradead.org
> Cc: linux-scsi@...r.kernel.org
> Signed-off-by: Ming Lei <ming.lei@...hat.com>
> ---
> kernel/irq/manage.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 1566abbf50e8..03bc041348b7 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -968,7 +968,18 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
> if (cpumask_available(desc->irq_common_data.affinity)) {
> const struct cpumask *m;
>
> - m = irq_data_get_effective_affinity_mask(&desc->irq_data);
> + /*
> + * Managed IRQ's affinity is setup gracefull on MUNA locality,
s/MUNA/NUMA
> + * also if IRQF_RESCUE_THREAD is set, interrupt flood has been
> + * triggered, so ask scheduler to run the thread on CPUs
> + * specified by this interrupt's affinity.
> + */
> + if ((action->flags & IRQF_RESCUE_THREAD) &&
> + irqd_affinity_is_managed(&desc->irq_data))
> + m = desc->irq_common_data.affinity;
> + else
> + m = irq_data_get_effective_affinity_mask(
> + &desc->irq_data);
> cpumask_copy(mask, m);
> } else {
> valid = false;
> --
Powered by blists - more mailing lists