All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pci: Fix INTx routing notifier recursion
Date: Thu, 7 Mar 2013 20:47:54 +0200	[thread overview]
Message-ID: <20130307184754.GA31034@redhat.com> (raw)
In-Reply-To: <20130307182853.22096.81037.stgit@bling.home>

On Thu, Mar 07, 2013 at 11:29:19AM -0700, Alex Williamson wrote:
> For some reason we recurse to fire the INTx routing notifier for each
> child of a bus, for each possible device of a bus.  That means that if
> we add a root port, the notifier gets called for that bridge 256
> times.  If we add an upstream switch behind that root port, 256^2.  But
> of course we need a downstream switch, 256^3.  This starts to be
> noticeable.  Stop the insanity.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

Applied, thanks.

> ---
>  hw/pci/pci.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 8772707..f24c389 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -1215,9 +1215,10 @@ void pci_bus_fire_intx_routing_notifier(PCIBus *bus)
>          if (dev && dev->intx_routing_notifier) {
>              dev->intx_routing_notifier(dev);
>          }
> -        QLIST_FOREACH(sec, &bus->child, sibling) {
> -            pci_bus_fire_intx_routing_notifier(sec);
> -        }
> +    }
> +
> +    QLIST_FOREACH(sec, &bus->child, sibling) {
> +        pci_bus_fire_intx_routing_notifier(sec);
>      }
>  }
>  

      reply	other threads:[~2013-03-07 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 18:29 [Qemu-devel] [PATCH] pci: Fix INTx routing notifier recursion Alex Williamson
2013-03-07 18:47 ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130307184754.GA31034@redhat.com \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.