[PATCH V3] nvme-pci: allow unmanaged interrupts

Marcelo Tosatti mtosatti at redhat.com
Mon Jul 15 09:23:20 PDT 2024


On Mon, Jul 15, 2024 at 01:03:02PM -0300, Marcelo Tosatti wrote:
> On Tue, Jul 02, 2024 at 06:41:12PM +0800, Ming Lei wrote:
> > From: Keith Busch <kbusch at kernel.org>
> > 
> > People _really_ want to control their interrupt affinity in some
> > cases, such as Openshift with Performance profile, in which each
> > irq's affinity is completely specified from userspace. Turns out
> > that 'isolcpus=managed_irqs' isn't enough.
> > 
> > Add module parameter to allow unmanaged interrupts, just as some
> > SCSI drivers are doing.
> > 
> > Cc: Marcelo Tosatti <mtosatti at redhat.com>
> > Signed-off-by: Keith Busch <kbusch at kernel.org>
> > Signed-off-by: Ming Lei <ming.lei at redhat.com>
> > ---
> > v2->v3:
> > 	- rebase on for-next
> > 	- add openshift use case
> > 
> > v1->v2: skip the the AFFINITY vector allocation if the parameter is
> > provided instead trying to make the vector code handle all post_vectors.
> > 
> >  drivers/nvme/host/pci.c | 18 ++++++++++++++++--
> >  1 file changed, 16 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> > index 5d8035218de9..a39c99c9b64d 100644
> > --- a/drivers/nvme/host/pci.c
> > +++ b/drivers/nvme/host/pci.c
> > @@ -63,6 +63,11 @@ MODULE_PARM_DESC(sgl_threshold,
> >  		"Use SGLs when average request segment size is larger or equal to "
> >  		"this size. Use 0 to disable SGLs.");
> >  
> > +static bool managed_irqs = true;
> > +module_param(managed_irqs, bool, 0444);
> > +MODULE_PARM_DESC(managed_irqs,
> > +		 "set to false for user controlled irq affinity");
> > +
> 
> What if you set "static bool managed_irqs" to false when isolcpus is being used?
> 
> For example:
> 
> if (housekeeping_enabled(HK_TYPE_MANAGED_IRQ))
> 	managed_irqs = false;

Well, that is confusing.

Maybe just:

if (housekeeping_enabled(HK_FLAG_MISC))
	managed_irqs = false;

Instead.

> 
> Then there is no additional parameter to tune (which addresses
> Christoph's concern).




More information about the Linux-nvme mailing list