public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Liu Chao <liuchao173@huawei.com>, linux-kernel@vger.kernel.org
Cc: hushiyuan@huawei.com, hewenliang4@huawei.com,
	Ming Lei <ming.lei@redhat.com>, Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH] genirq: Limit irq_calc_affinity_vectors to housekeeping CPUs
Date: Thu, 28 Jan 2021 01:06:20 +0100	[thread overview]
Message-ID: <87ft2mdiwz.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20210122084746.3407372-1-liuchao173@huawei.com>

Liu,

On Fri, Jan 22 2021 at 08:47, Liu Chao wrote:
> Replace the cpumask used in irq_calc_affinity_vectors from all possible
> CPUs to only housekeeping CPUs.
>
> When we have isolated CPUs used by real-time tasks, IRQs will be move to
> housekeeping CPUs.

No.

> If there are too many IRQ vectors, moving the all to housekeeping CPUs may
> exceed per-CPU vector limits. For example, when I only have two
> housekeeping CPUs, there are dozens of IRQs on two CPUs, but actually one
> IRQ per housekeeping CPU is enough.

This does not make any sense.

Assumed a system has 256 possible CPUs and the device allows 256 queues
then each possible CPU will have ONE queue and ONE associated
interrupt. Nothing will change the affinity of any of those interrupts
ever.

The only way how the housekeeping mask interacts with multiqueue
affinities is when there are less queues and therefore less interrupts
than CPUs which means that one queue and it's interrupt is associated to
multiple CPUs. So the resulting affinity mask might spawn housekeeping
and isolated CPUs. When the affinity is set up for the interrupt in
hardware then the selection logic which choses a target CPU based on the
interrupt affinity mask will prefer the housekeeping CPUs and avoid the
isolated ones. But that does not cause vector exhaustion except you have
more devices than vectors.

So for a single multiqueue device a housekeeping CPU will not have more
than one managed queue interrupt ever.

I'm not understanding which problem are you trying to solve.

Thanks,

        tglx

  reply	other threads:[~2021-01-28  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22  8:47 [PATCH] genirq: Limit irq_calc_affinity_vectors to housekeeping CPUs Liu Chao
2021-01-28  0:06 ` Thomas Gleixner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-24  4:23 Liu Chao

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=87ft2mdiwz.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=hewenliang4@huawei.com \
    --cc=hushiyuan@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuchao173@huawei.com \
    --cc=maz@kernel.org \
    --cc=ming.lei@redhat.com \
    /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