public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Costa Shulyupin" <costa.shul@redhat.com>,
	longman@redhat.com, ming.lei@redhat.com, pauld@redhat.com,
	juri.lelli@redhat.com, vschneid@redhat.com,
	"Tejun Heo" <tj@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Costa Shulyupin" <costa.shul@redhat.com>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [RFC PATCH v4 2/4] genirq/cpuhotplug: Dynamically isolate CPUs from managed interrupts
Date: Sun, 01 Dec 2024 14:43:14 +0100	[thread overview]
Message-ID: <87zflfv7rh.ffs@tglx> (raw)
In-Reply-To: <20241201124244.997754-3-costa.shul@redhat.com>

On Sun, Dec 01 2024 at 14:42, Costa Shulyupin wrote:
> After change of housekeeping_cpumask(HK_TYPE_MANAGED_IRQ) during runtime
> managed interrupts continue to run on isolated CPUs.
>
> Dynamic CPUs isolation is complex task. One of approaches is:
> 1. Set affected CPUs offline and disable relevant interrupts
> 2. Change housekeeping_cpumask
> 3. Set affected CPUs online and enable relevant interrupts
>
> irq_restore_affinity_of_irq() restores managed interrupts
> during complex CPU hotplug process of bringing back a CPU online.
>
> Leave the interrupts disabled those affinity doesn't intersect
> with new housekeeping_cpumask thereby ensuring isolation
> of the CPU from managed intrrupts.

And thereby breaking drivers, which will restore the per cpu queue and
expect interrupts to work.

The semantics of HK_TYPE_MANAGED_IRQ are clearly not what you try to
make them. See the description of the "managed_irq" command line
parameter:

        Isolate from being targeted by managed interrupts
        which have an interrupt mask containing isolated
        CPUs. The affinity of managed interrupts is
        handled by the kernel and cannot be changed via
        the /proc/irq/* interfaces.

        This isolation is best effort and only effective
        if the automatically assigned interrupt mask of a
        device queue contains isolated and housekeeping
        CPUs. If housekeeping CPUs are online then such
        interrupts are directed to the housekeeping CPU
        so that IO submitted on the housekeeping CPU
        cannot disturb the isolated CPU.

        If a queue's affinity mask contains only isolated
        CPUs then this parameter has no effect on the
        interrupt routing decision, though interrupts are
        only delivered when tasks running on those
        isolated CPUs submit IO. IO submitted on
        housekeeping CPUs has no influence on those
        queues.

It's pretty clear, no?

Thanks,

        tglx

  reply	other threads:[~2024-12-01 13:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-01 12:42 [RFC PATCH v4 0/4] genirq/cpuhotplug: Adjust managed interrupts according to change of housekeeping cpumask Costa Shulyupin
2024-12-01 12:42 ` [RFC PATCH v4 1/4] cgroup/cpuset: Add HK_TYPE_MANAGED_IRQ to HOUSEKEEPING_FLAGS Costa Shulyupin
2024-12-01 12:42 ` [RFC PATCH v4 2/4] genirq/cpuhotplug: Dynamically isolate CPUs from managed interrupts Costa Shulyupin
2024-12-01 13:43   ` Thomas Gleixner [this message]
     [not found]     ` <CADDUTFx3bS4bQ+6s2MSpAL=aN+5CP7V9i5vu-EnrfLrSYbQ_vg@mail.gmail.com>
2024-12-04 14:12       ` Thomas Gleixner
2024-12-01 12:42 ` [RFC PATCH v4 3/4] cgroup/cpuset: Restart CPUs whose isolated_cpus bits have changed Costa Shulyupin
2024-12-01 12:42 ` [RFC PATCH v4 4/4] DO NOT MERGE: Test CPU isolation from managed interrupts Costa Shulyupin

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=87zflfv7rh.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=cgroups@vger.kernel.org \
    --cc=costa.shul@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=ming.lei@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=pauld@redhat.com \
    --cc=tj@kernel.org \
    --cc=vschneid@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