From: Thomas Gleixner <tglx@linutronix.de>
To: Florian Bezdeka <florian.bezdeka@siemens.com>,
"bigeasy@linutronix.de" <bigeasy@linutronix.de>
Cc: "Preclik, Tobias" <tobias.preclik@siemens.com>,
Frederic Weisbecker <frederic@kernel.org>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
"Kiszka, Jan" <jan.kiszka@siemens.com>,
Waiman Long <longman@redhat.com>,
Gabriele Monaco <gmonaco@redhat.com>
Subject: Re: Control of IRQ Affinities from Userspace
Date: Wed, 26 Nov 2025 15:26:36 +0100 [thread overview]
Message-ID: <87fra0hntv.ffs@tglx> (raw)
In-Reply-To: <4de393b9304c99386d847ed0694ec12075a99c0a.camel@siemens.com>
On Wed, Nov 26 2025 at 10:20, Florian Bezdeka wrote:
> On Tue, 2025-11-25 at 17:31 +0100, Thomas Gleixner wrote:
>> > This question can not be answered with yes/no. It depends. Affinities
>> > are based on the default_smp_affinity during creation. But as it turned
>> > out there are drivers that overwrite those affinities after IRQ
>> > creation.
>>
>> Which ones?
>
> The problem at hand is the stmmac
> (drivers/net/ethernet/stmicro/stmmac/stmmac_main), which is pulled in by
> a couple of others like the dwmac_intel in our case.
>
> Searching for the problematic irq_set_affinity_hint() call in
> drivers/net/ethernet reveals more "affected" drivers but each of them
> requires some double checking. In some cases the supplied cpumask or the
> "time of the call" might be OKish.
The question is whether that affinity hint has a functional requirement
to be applied or not. I don't think so because those interrupts can be
moved by userspace as it sees fit.
So it's easy enough to make this "set" part conditional and restrict it
to some TBD mask (housekeeping, default ...) under some isolation magic.
>> > The user normally configures the number of HW queues that the NIC should
>> > use. In most cases in combination with some HW packet filters to achieve
>> > best packet separation. IMHO the user should not have to deal with any
>> > (additional) CPU mask on that level. RT tuning will / should handle
>> > that.
>>
>> How so. The kernel magically knows what the user wants?
>
> We can already identify the IRQs that belong to a certain hardware queue
> (NAPI threads) and move it when necessary. I just wanted to express that
> there might not be a need for an additional API / cpumask.
Ok.
>> Not a so dead road :)
>
> Grml... I definitely fat-fingered the query. Anyway, this housekeeping
> API still seems very boot-time oriented to me. Can't see yet where this
> housekeeping cpumasks are filled up by the cgroup/cpuset infrastructure.
>
> cgroups/cpusets don't care about "isolation" in that sense yet. It's
> just about cpumasks for compute. Am I missing something?
There is work in progress on various related ends:
https://lore.kernel.org/all/20251105210348.35256-1-frederic@kernel.org
https://lore.kernel.org/all/20251120145653.296659-1-gmonaco@redhat.com
https://lore.kernel.org/all/20251105043848.382703-1-longman@redhat.com
https://lore.kernel.org/all/20251121143500.42111-3-frederic@kernel.org
There is certainly more going on it that area, but those were the bits
and pieces I could remember from the top of my head. Waiman and Gabriele
should be able to fill in some blanks, but that discussion should move
to LKML then.
Thanks,
tglx
next prev parent reply other threads:[~2025-11-26 14:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 14:20 Control of IRQ Affinities from Userspace Preclik, Tobias
2025-11-03 15:53 ` Sebastian Andrzej Siewior
2025-11-03 17:12 ` Florian Bezdeka
2025-11-05 13:11 ` Preclik, Tobias
2025-11-05 13:18 ` Preclik, Tobias
2025-11-11 14:35 ` bigeasy
2025-11-11 14:34 ` bigeasy
2025-11-21 13:25 ` Preclik, Tobias
2025-11-24 9:59 ` bigeasy
2025-11-25 11:32 ` Florian Bezdeka
2025-11-25 11:50 ` bigeasy
2025-11-25 14:36 ` Florian Bezdeka
2025-11-25 16:31 ` Thomas Gleixner
2025-11-26 9:20 ` Florian Bezdeka
2025-11-26 14:26 ` Thomas Gleixner [this message]
2025-11-26 15:07 ` Florian Bezdeka
2025-11-26 19:15 ` Thomas Gleixner
2025-11-27 14:06 ` Preclik, Tobias
2025-11-27 14:52 ` Florian Bezdeka
2025-11-27 18:09 ` Thomas Gleixner
2025-11-28 7:33 ` Florian Bezdeka
2025-11-26 15:45 ` Frederic Weisbecker
2025-11-26 15:31 ` Frederic Weisbecker
2025-11-26 15:24 ` Frederic Weisbecker
2025-11-11 13:58 ` Sebastian Andrzej Siewior
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=87fra0hntv.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=florian.bezdeka@siemens.com \
--cc=frederic@kernel.org \
--cc=gmonaco@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=longman@redhat.com \
--cc=tobias.preclik@siemens.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