From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: xhci_hcd intterrupt affinity in Dom0/DomU limited to single interrupt Date: Tue, 1 Sep 2015 16:56:57 -0400 Message-ID: <20150901205657.GA18532@l.oracle.com> References: <1441121643.26292.63.camel@citrix.com> <800613365.4285959.1441128848192.JavaMail.yahoo@mail.yahoo.com> <631331126.1156575.1441129186888.JavaMail.yahoo@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <631331126.1156575.1441129186888.JavaMail.yahoo@mail.yahoo.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Justin Acker Cc: boris.ostrovsky@oracle.com, "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, Sep 01, 2015 at 05:39:46PM +0000, Justin Acker wrote: > Taking this to the dev list from users. = > = > Is there a way to force or enable pirq delivery to a set of cpus as oppos= ed to single device from being a assigned a single pirq so that its interru= pt can be distributed across multiple cpus? I believe the device drivers do= support multiple queues when run natively without the Dom0 loaded. The dev= ice in question is the xhci_hcd driver for which I/O transfers seem to be s= lowed when the Dom0 is loaded. The behavior seems to pass through to the Do= mU if pass through is enabled. I found some similar threads, but most relat= e to Ethernet controllers. I tried some of the x2apic and x2apic_phys dom0 = kernel arguments, but none distributed the pirqs. Based on the reading rela= ting to IRQs for Xen, I think pinning the pirqs to cpu0 is done to avoid an= interrupt storm. I tried IRQ balance and when configured/adjusted it will = balance individual pirqs, but not multiple interrupts. Yes. You can do it with smp affinity: https://cs.uwaterloo.ca/~brecht/servers/apic/SMP-affinity.txt I don't follow the "behavior seems to pass through to the DomU if pass thro= ugh is enabled" ? > = > = > = > With irqbalance enabled in Dom0: What version? There was a bug in it where it would never distribute the IRQ= s properly across the CPUs. Boris (CC-ed) might remember the upstream patch that made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xen-pirq-msi=A0=A0=A0=A0=A0=A0 snd_hda_intel > = > With native 3.19 kernel: > = > Without Dom0 for the same system from the first message: > = > # cat /proc/interrupts > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 CPU0=A0=A0=A0=A0=A0=A0 CPU1=A0=A0=A0=A0=A0= =A0 CPU2=A0=A0=A0=A0=A0=A0 CPU3=A0=A0=A0=A0=A0=A0 CPU4=A0=A0=A0=A0=A0=A0 CP= U5=A0=A0=A0=A0=A0=A0 CPU6=A0=A0=A0=A0=A0=A0 CPU7=A0=A0=A0=A0=A0 = > =A0 0:=A0=A0=A0=A0=A0=A0=A0=A0 33=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 0=A0 IR-IO-APIC-edge=A0=A0=A0=A0=A0 timer > =A0 8:=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 1=A0=A0=A0=A0= =A0=A0=A0=A0=A0 0=A0 IR-IO-APIC-edge=A0=A0=A0=A0=A0 rtc0 > =A0 9:=A0=A0=A0=A0=A0=A0=A0=A0 20=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 0=A0=A0=A0=A0=A0=A0=A0=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A0=A0=A0=A0=A0 0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 0=A0 DMAR_MSI-edge=A0=A0=A0=A0=A0 dmar0 > =A025:=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 0=A0 DMAR_MSI-edge=A0=A0=A0=A0=A0 dmar1 > =A026:=A0=A0=A0=A0=A0 20419=A0=A0=A0=A0=A0=A0 1609=A0=A0=A0=A0=A0 26822= =A0=A0=A0=A0=A0=A0=A0 567=A0=A0=A0=A0=A0 62281=A0=A0=A0=A0=A0=A0 5426=A0=A0= =A0=A0=A0 14928=A0=A0=A0=A0=A0=A0=A0 395=A0 IR-PCI-MSI-edge=A0=A0=A0=A0=A0 = 0000:00:1f.2 > =A027:=A0=A0 17977230=A0=A0=A0=A0 628258=A0=A0 44247270=A0=A0=A0=A0 12039= 1 1597809883=A0=A0 14440991=A0 152189328=A0=A0=A0=A0=A0 73322=A0 IR-PCI-MSI= -edge=A0=A0=A0=A0=A0 xhci_hcd > =A028:=A0=A0=A0=A0=A0=A0=A0 563=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 1= =A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 6=A0=A0=A0=A0=A0= =A0=A0=A0=A0 0=A0 IR-PCI-MSI-edge=A0=A0=A0=A0=A0 i915 > =A029:=A0=A0=A0=A0=A0=A0=A0=A0 14=A0=A0=A0=A0=A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=A0 5=A0=A0=A0=A0=A0=A0 1797=A0=A0=A0=A0=A0= =A0=A0 265=A0=A0=A0=A0=A0=A0 1507=A0=A0=A0=A0=A0=A0=A0=A0 20=A0 IR-PCI-MSI-= edge=A0=A0=A0=A0=A0 eth1-tx-0 > =A034:=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 1=A0=A0=A0= =A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 1=A0=A0=A0=A0=A0=A0=A0=A0=A0 2=A0=A0=A0=A0= =A0=A0=A0=A0=A0 0=A0 IR-PCI-MSI-edge=A0=A0=A0=A0=A0 eth1 > =A035:=A0=A0=A0=A0=A0=A0=A0=A0=A0 5=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0 12=A0=A0=A0=A0=A0=A0=A0 148=A0= =A0=A0=A0=A0=A0=A0=A0=A0 6=A0=A0=A0=A0=A0=A0=A0=A0=A0 2=A0=A0=A0=A0=A0=A0= =A0=A0=A0 1=A0 IR-PCI-MSI-edge=A0=A0=A0=A0=A0 snd_hda_intel > = > = > The USB controller is an Intel C210: > = > 00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Fa= mily USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI]) > =A0=A0=A0 Subsystem: Dell Device 053e > =A0=A0=A0 Flags: bus master, medium devsel, latency 0, IRQ 78 > =A0=A0=A0 Memory at f7f20000 (64-bit, non-prefetchable) [size=3D64K] > =A0=A0=A0 Capabilities: [70] Power Management version 2 > =A0=A0=A0 Capabilities: [80] MSI: Enable+ Count=3D1/8 Maskable- 64bit+ > =A0=A0=A0 Kernel driver in use: xhci_hcd > =A0=A0=A0 Kernel modules: xhci_pci > On Tuesday, September 1, 2015 11:50 AM, Ian Campbell wrote: > = > = > On Tue, 2015-09-01 at 13:56 +0000, Justin Acker wrote: > > Thanks Ian, > > = > > I appreciate the explanation. I believe the device drivers do support = > > multiple queues when run natively without the Dom0 loaded. The device i= n = > > question is the xhci_hcd driver for which I/O transfers seem to be slow= ed = > > when the Dom0 is loaded. The behavior seems to pass through to the DomU = > > if pass through is enabled. I found some similar threads, but most rela= te = > > to Ethernet controllers. I tried some of the x2apic and x2apic_phys dom= 0 = > > kernel arguments, but none distributed the pirqs. Based on the reading = > > relating to IRQs for Xen, I think pinning the pirqs to cpu0 is done to = > > avoid an I/O storm. I tried IRQ balance and when configured/adjusted it = > > will balance individual pirqs, but not multiple interrupts. = > > = > > Is there a way to force or enable pirq delivery to a set of cpus as you = > > mentioned above or omit a single device from being a assigned a PIRQ so = > > that its interrupt can be distributed across all cpus? = > = > A PIRQ is the way an interrupt is exposed to a PV guest, without it there > would be no interrupt at all. > = > I'm afraid I'm out of my depth WRT how x86/MSIs and Xen x86/PV pirqs > interact, in particular WRT configuring which set of CPUs can have the IRQ > delivered. > = > If no one else chimes in soon I'd suggest taking this to the dev list, at > the very least someone who knows what they are talking about (i.e. other > than me) might be able to help. > = > Ian. > = > = > = > = > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel