From: Marcel Apfelbaum <marcel@redhat.com>
To: "Kinsella, Ray" <ray.kinsella@intel.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] >256 Virtio-net-pci hotplug Devices
Date: Tue, 18 Jul 2017 16:49:51 +0300 [thread overview]
Message-ID: <3319b641-b7f3-0ee8-e5ed-9c378e723eb4@redhat.com> (raw)
In-Reply-To: <767EFADFF809234DB6CAABD6D2F93847C5D31539@IRSMSX107.ger.corp.intel.com>
On 18/07/2017 0:50, Kinsella, Ray wrote:
> Hi folks,
>
Hi Ray,
> I am trying to create a VM that supports hot-plugging a large number of virtio-net-pci device,
> up to 1000 devices initially.
>
> From the docs (see below) and from playing with QEMU, it looks like there are two options.
> Both with limitations.
>
> PCI Express switch
>
> It looks like using a PCI Express switch hierarchy is not an option due to bus exhaustion.
> Each downstream port creates a separate bus and each downstream port only supports hot-plugging a single device.
> So this gives us a max of 256-ish buses/devices pairs.
Right.
>
> PCI Root Ports
>
> The other option is use a flatter hierarchy, with a number of multi-function PCI Root Ports hanging off 'pcie.0'.
> However each 'PCI Root Port' can support hot-plugging a single device.
> So this method really becomes a function of how many free address we have on 'pci.0'.
> If we make room for say 16 multifunction devices, we get 16*8 ... 128
> So ultimately, this will approach will give us a similar to number to using a switch.
>
> Is there another method?
You can use multi-function PCIe Root Ports, this will give you 8 ports
per slot, if you have 16 empty slots (I think we have more) you reach
128 root ports.
Then you can use multi-function virtio-net-pci devices, this will
give you 8 functions per port, so you reach the target of 1024 devices.
You loose hot-plug granularity since you can hot-plug 8-functions group,
but maybe is OK, depending on your scenario.
> ( pxb-pcie doesn't support hotplug for instance, and only a single pcie domain is supported qemu )
>
Even so, you can use one cold-plugged pxb-pcie if you don't
have enough empty slots on pcie.0, in order to reach the maximum
number of PCIe Root Ports (256) which is the maximum for a single
PCI domain.
If you need granularity per single device (1000+ hot-pluggable),
you could enhance the pxb-pcie to support multiple pci domains.
Thanks,
Marcel
> Thanks,
>
> Ray K
>
> Pcie.txt,
> ( https://github.com/qemu/qemu/blob/master/docs/pcie.txt )
> Q35 preso
> ( http://wiki.qemu.org/images/4/4e/Q35.pdf )
>
>
>
>
next prev parent reply other threads:[~2017-07-18 13:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 21:50 [Qemu-devel] >256 Virtio-net-pci hotplug Devices Kinsella, Ray
2017-07-18 13:49 ` Marcel Apfelbaum [this message]
2017-07-20 0:44 ` Kinsella, Ray
2017-07-21 8:33 ` Marcel Apfelbaum
2017-07-21 23:57 ` Kinsella, Ray
2017-07-23 16:28 ` Marcel Apfelbaum
2017-07-23 20:04 ` Kevin O'Connor
2017-07-24 4:53 ` Kinsella, Ray
2017-07-24 7:14 ` Marcel Apfelbaum
2017-07-25 18:00 ` Kinsella, Ray
2017-08-02 12:43 ` Marcel Apfelbaum
2017-08-07 19:00 ` Kinsella, Ray
2017-08-09 10:53 ` Marcel Apfelbaum
2017-08-09 16:36 ` Kinsella, Ray
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=3319b641-b7f3-0ee8-e5ed-9c378e723eb4@redhat.com \
--to=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ray.kinsella@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).