[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE=gft7mLAU3G+f8gi_etRSpUijoCh7_6ni9Ob2JqjW7Q1n3yQ@mail.gmail.com>
Date: Wed, 29 Jan 2020 14:53:15 -0800
From: Evan Green <evgreen@...omium.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Rajat Jain <rajatja@...gle.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
x86@...nel.org, Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH v2] PCI/MSI: Avoid torn updates to MSI pairs
On Wed, Jan 29, 2020 at 1:01 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Evan,
>
> Evan Green <evgreen@...omium.org> writes:
> > On Tue, Jan 28, 2020 at 2:48 PM Thomas Gleixner <tglx@...utronix.de> wrote:
> >>
> >> Bah. I'm sure I looked at that call chain, noticed the double vector
> >> lock and then forgot. Delta patch below.
> >
> > It's working well with the delta patch, been running for about an hour
> > with no issues.
>
> thanks for the info and for testing!
>
> Could you please add some instrumentation to see how often this stuff
> actually triggers spurious interrupts?
In about 10 minutes of this script running, I got 142 hits. My script
can toggle the HT cpus on and off about twice per second.
Here's my diff (sorry it's mangled by gmail). If you're looking for
something else, let me know, or I can run a patch.
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
index 90baf2c66bd40..f9c46fc30d658 100644
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -61,6 +61,8 @@ static void irq_msi_update_msg(struct irq_data
*irqd, struct irq_cfg *cfg)
irq_data_get_irq_chip(irqd)->irq_write_msi_msg(irqd, msg);
}
+int evanpending;
+
static int
msi_set_affinity(struct irq_data *irqd, const struct cpumask *mask, bool force)
{
@@ -155,8 +157,10 @@ msi_set_affinity(struct irq_data *irqd, const
struct cpumask *mask, bool force)
unlock_vector_lock();
- if (pending)
+ if (pending) {
+ printk("EVAN pending %d", ++evanpending);
irq_data_get_irq_chip(irqd)->irq_retrigger(irqd);
+ }
return ret;
}
-Evan
Powered by blists - more mailing lists