Hi Wojciech, thank you for reply.
It should remain static and I see it is quite static. But what prevents that an arbitrary CPU is picking up an interrupt? Perhaps it is my interpretation of the following sentence: "By default,an IRQ may be handled on any CPU" from https://www.kernel.org/doc/Documentation/networking/scaling.txt I guess it means 'in most cases the same CPU will process it, but no hard guarantees are given. Instead of 'each interrupt for the same IRQ will be processed by a random CPU' On Friday, March 15, 2019 at 5:08:53 PM UTC+2, Wojciech Kudla wrote: > > The rx-queue to CPU affinity you're referring to should remain fairly > static if the packets are getting processed fast enough. > If you are interested in controlling this behavior you can manipulate > receive flow hash indirection tables (ethtool - x) , irq affinities > (/proc/interrupts/$irq/smp_affinity) > or configure relevant stack if you're using solarflare (through onload > profile). > > Hope this helps. > > > On Fri, 15 Mar 2019, 14:40 Peter Veentjer, <[email protected] > <javascript:>> wrote: > >> I have a question about RSS and how a CPU is selected to process the >> interrupt. >> >> So with RSS you have multiple rx-queue and each rx-queue has an IRQ >> associated to it. Each CPU can pick up the IRQ as clearly explained here: >> >> https://www.kernel.org/doc/Documentation/networking/scaling.txt >> >> It is possible to using IRQ/CPU affinity to prevent that just any CPU >> picking up the IRQ. >> >> My question is about the default behavior when no explicit affinity has >> been set. >> >> Is there any advantage of letting the same rx-queue being processed by >> different CPU's? In case of a random CPU picking up same IRQ, you could end >> a packet being processed at a different CPU for every packet being >> received. This will cause a lot of cache coherence traffic which will >> certainly not improve performance. >> >> When I look at /proc/interrupts of my local system, it seems the same CPU >> is processing a specific rx-queue. So it looks that the OS is already >> applying some form of affinity to map an IRQ to a CPU. >> >> Can someone shed a light on this? >> >> Thanks. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "mechanical-sympathy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
