> -----Original Message----- > From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb- > owner@xxxxxxxxxxxxxxx] On Behalf Of Sarah Sharp > Sent: Wednesday, June 01, 2011 4:41 AM > To: Xu, Andiry > Cc: linux-usb@xxxxxxxxxxxxxxx; gregkh@xxxxxxx; Matthew Wilcox > Subject: Re: [RFC 3/4] xHCI: Enable multiple interrupters > > Hi Andiry, > > Now that I have a bit of time on my hands (before the next crisis > comes), I finally took at look at your multiple event rings patchset. > > The biggest issue is that when an interrupt comes in for any MSI-X > interrupter, you try to service the event rings for all interrupters. > I think you would have fewer cache misses if you only serviced the > interrupter that is tied to that particular CPU. > > Matthew has a couple patches to make it easier to only service the MSI- > X > vector that caused the xHCI driver interrupt. He'll be sending those > shortly. Can you please review them and look at rebasing this patchset > on top of those and the usb-next tree? I'd like to try to get this > patchset into 2.6.41/3.1. > Actually I did not check all the event rings, just check the Interupt Pending bit in every ir_set registers. But Matthew's approach is better and we do not need to check all the registers to find the interrupter. I'll modify and rebase the interrupter patchset on Matthew patches, but I'll take a vacation soon and will finish it after I return. Thanks, Andiry > > On Thu, Feb 17, 2011 at 06:07:16PM +0800, Andiry Xu wrote: > > @@ -2088,9 +2092,9 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)] > ... > > @@ -2126,53 +2121,75 @@ hw_died: > > */ > > status |= STS_EINT; > > xhci_writel(xhci, status, &xhci->op_regs->status); > > - /* FIXME when MSI-X is supported and there are multiple vectors > */ > > - /* Clear the MSI-X event interrupt status */ > > > > - if (hcd->irq != -1) { > > - u32 irq_pending; > > - /* Acknowledge the PCI interrupt */ > > - irq_pending = xhci_readl(xhci, &xhci->ir_set->irq_pending); > > - irq_pending |= 0x3; > > - xhci_writel(xhci, irq_pending, &xhci->ir_set->irq_pending); > > - } > > + /* Check all the interrupters */ > > + for (i = 0; i < xhci->intr_num; i++) { > > + xhci->ir_set = (void *) &xhci->run_regs->ir_set[i]; > > + if (hcd->irq != -1) { > > + u32 irq_pending; > > + /* Acknowledge the PCI interrupt */ > > + irq_pending = > > + xhci_readl(xhci, &xhci->ir_set->irq_pending); > > + /* If the interrupt is not from this interrupter, > > + * continue immediately > > + */ > > + if (!(irq_pending & 0x1)) > > + continue; > > + irq_pending |= 0x3; > > + xhci_writel(xhci, irq_pending, > > + &xhci->ir_set->irq_pending); > > + } > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html