<html><head><style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style></head><body><div>On Fri, 2026-08-21 at 12:53 +0200, Sebastian Andrzej Siewior wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>On 2026-08-21 12:38:52 [+0200], Jan Kiszka wrote:</pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>Fully agree: drivers should not set affinities. They should just express</pre><pre>desires or additional constraints. The ultimately resulting affinity for</pre><pre>an IRQ should be the result of the various constraints that kernel and</pre><pre>userland may express via NUMA placements, isolcpus, some dynamic</pre><pre>isolation/grouping constraints, or you-name-it.</pre></blockquote><pre><br></pre><pre>You might want to look at irq_create_affinity_masks()/</pre><pre>group_cpus_evenly() which attempts to spread irqs evenly across CPUs/</pre><pre>NUMA nodes. This is used by storage is considered a bit by the</pre><pre>isolcpus=managed_irq option.</pre></blockquote><div><br></div><div>I'm aware of those functions but faced the following shortcomings regarding timing:</div><div><br></div><div>1) irq_create_affinity_masks() is called on probe() time, which normally is "boot time". Userspace is not up and running yet, so the default_smp_affinity was not properly set up.</div><div><br></div><div>2) You can not overwrite the affinities set on probe() time until request_irq() populates the affinities to /proc - and with that the interface itself - at open()/"interface up for the first time" time.</div><div><br></div><div>If the default_smp_affinity changes until your interface comes up for the first time, it might violate the current settings already. No chance for a user to correct the current (device) settings.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre><br></pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>I think we need a big picture how things should eventually look like and</pre><pre>then develop a strategy how to step-wise convert existing code.</pre><pre><br></pre><pre><br></pre></blockquote></blockquote><div><br></div><pre>I just received the confirmation email that my abstract, which I submitted to the Linux Plumbers Conference (Scheduler and Real-Time micro-conference), has been accepted. There will be a session called "PREEMPT_RT: How a simple interface up event might break your realtime".</pre><div><br></div><div>Seems we have the chance to discuss this topic in person.</div><div><br></div><div>Florian</div><div><br></div><div><br></div><div><span></span></div></body></html>