Re: [RFC PATCH v2 1/1] scsi: mpi3mr: Introduce smp_affinity_enable module parameter
From: John Garry
Date: Fri Jun 20 2025 - 06:44:10 EST
On 19/06/2025 20:35, Aaron Tomlin wrote:
On Wed, Jun 18, 2025 at 07:49:16AM +0100, John Garry wrote:
BTW, if you use taskset to set the affinity of a process and ensure that
/sys/block/xxx/queue/rq_affinity is set so that we complete on same CPU as
submitted, then I thought that this would ensure that interrupts are not
bothering other CPUs.
Hi John,
I'm trying to understand this better. If I'm not mistaken, modifying
/sys/block/[device]/queue/rq_affinity impacts where requests are processed.
Could you clarify how this would prevent an IRQ from being delivered to an
isolated CPU?
If you echo 2 > /sys/block/[device]/queue/rq_affinity, then completions
will occur on the same CPU which their originated. And through taskset,
if you keep the processes generating traffic on a certain group of CPUs,
then other CPUs should not see any loading from those same processes.
I am assuming that there is a one-to-one CPU <-> HW queue relationship.
That's my unverified idea...