All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: kvm@vger.kernel.org
Cc: Alex Williamson <alex.williamson@hp.com>
Subject: Re: [PATCH] kvm: device-assignment: Catch GSI overflow
Date: Fri, 8 May 2009 17:28:00 +0800	[thread overview]
Message-ID: <200905081728.01300.sheng@linux.intel.com> (raw)
In-Reply-To: <1241716613.23680.31.camel@bling>

On Friday 08 May 2009 01:16:53 Alex Williamson wrote:
> On Thu, 2009-05-07 at 11:09 -0600, Alex Williamson wrote:
> > Fix the index at which we return -ENOSPC since the kernel side will
> > reject a GSI >= KVM_MAX_IRQ_ROUTES.  Also, mask as a signed int before
> > testing for error.
>
> Even with this, there still seems to be a fundamental problem with our
> consumption of GSIs in kvm.  For example, every time a guest writes to
> the MSI capabilities area and enables MSI support, we call
> kvm_get_irq_route_gsi() to get a new max_used_gsi + 1 value, then call
> kvm_add_routing_entry(), which updates max_used_gsi.  It doesn't take
> too long before we exhaust the GSI space and the device no longer works.
> This seems to happen within a minute or two of booting a guest with an
> e1000e device sitting idle on a busy network.  Do we need to keep a
> bitmap of used GSIs or maybe just attempt to reuse the GSI we've gotten
> previously for the device?  Thanks,

Yes, I think a bitmap is much better here.

Thanks.

-- 
regards
Yang, Sheng

>
> Alex
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



  reply	other threads:[~2009-05-08  9:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 17:09 [PATCH] kvm: device-assignment: Catch GSI overflow Alex Williamson
2009-05-07 17:16 ` Alex Williamson
2009-05-08  9:28   ` Sheng Yang [this message]
2009-05-12 22:14 ` [PATCH] kvm: device-assignment: Fix kvm_get_irq_route_gsi() return check Alex Williamson
2009-05-13  3:36   ` Yang, Sheng
2009-05-13  3:55     ` Alex Williamson
2009-05-13  4:09       ` Yang, Sheng
2009-05-13  4:45   ` [PATCH v2] " Alex Williamson
2009-05-13  4:58     ` Yang, Sheng

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=200905081728.01300.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=alex.williamson@hp.com \
    --cc=kvm@vger.kernel.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.