[libvirt] [PATCH] qemu: multiqueue for ccw devices

Allow ccw devices to be used with multiqueues. Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Reviewed-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.comCornelia Huck <cornelia.huck@de.ibm.com>> --- src/qemu/qemu_command.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2137985..0205831 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5062,9 +5062,13 @@ qemuBuildNicDevStr(virDomainDefPtr def, } } if (usingVirtio && vhostfdSize > 1) { - /* As advised at http://www.linux-kvm.org/page/Multiqueue - * we should add vectors=2*N+2 where N is the vhostfdSize */ - virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2); + if (net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { + virBufferAsprintf(&buf, ",mq=on"); + } else { + /* As advised at http://www.linux-kvm.org/page/Multiqueue + * we should add vectors=2*N+2 where N is the vhostfdSize */ + virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2); + } } if (vlan == -1) virBufferAsprintf(&buf, ",netdev=host%s", net->info.alias); -- 2.3.0

On 05/06/2015 10:07 AM, Boris Fiuczynski wrote:
Allow ccw devices to be used with multiqueues.
Can you provide a bit more information in the commit log on the reason for this difference? Is the vectors= option not supported when using the ccw bus? Or is is simply not needed because it's determined automatically based on the number of fd's that are passed in?
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Reviewed-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.comCornelia Huck <cornelia.huck@de.ibm.com>>
--- src/qemu/qemu_command.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2137985..0205831 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5062,9 +5062,13 @@ qemuBuildNicDevStr(virDomainDefPtr def, } } if (usingVirtio && vhostfdSize > 1) { - /* As advised at http://www.linux-kvm.org/page/Multiqueue - * we should add vectors=2*N+2 where N is the vhostfdSize */ - virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2); + if (net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { + virBufferAsprintf(&buf, ",mq=on"); + } else { + /* As advised at http://www.linux-kvm.org/page/Multiqueue + * we should add vectors=2*N+2 where N is the vhostfdSize */ + virBufferAsprintf(&buf, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2); + } } if (vlan == -1) virBufferAsprintf(&buf, ",netdev=host%s", net->info.alias);

On 05/06/2015 05:02 PM, Laine Stump wrote:
On 05/06/2015 10:07 AM, Boris Fiuczynski wrote:
Allow ccw devices to be used with multiqueues. Can you provide a bit more information in the commit log on the reason for this difference? Is the vectors= option not supported when using the ccw bus? Or is is simply not needed because it's determined automatically based on the number of fd's that are passed in?
Sure and sorry about the short commit log. ccw provides a one to one relation of fds to queues and does not support the vectors option. -- Mit freundlichen Grüßen/Kind regards Boris Fiuczynski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

On 05/06/2015 11:20 AM, Boris Fiuczynski wrote:
On 05/06/2015 05:02 PM, Laine Stump wrote:
On 05/06/2015 10:07 AM, Boris Fiuczynski wrote:
Allow ccw devices to be used with multiqueues. Can you provide a bit more information in the commit log on the reason for this difference? Is the vectors= option not supported when using the ccw bus? Or is is simply not needed because it's determined automatically based on the number of fd's that are passed in?
Sure and sorry about the short commit log. ccw provides a one to one relation of fds to queues and does not support the vectors option.
Okay, ACK. I'll just add that sentence to the commit log message and push it. No need to respin. Thanks!

On 05/06/2015 05:32 PM, Laine Stump wrote:
On 05/06/2015 11:20 AM, Boris Fiuczynski wrote:
On 05/06/2015 05:02 PM, Laine Stump wrote:
On 05/06/2015 10:07 AM, Boris Fiuczynski wrote:
Allow ccw devices to be used with multiqueues. Can you provide a bit more information in the commit log on the reason for this difference? Is the vectors= option not supported when using the ccw bus? Or is is simply not needed because it's determined automatically based on the number of fd's that are passed in?
Sure and sorry about the short commit log. ccw provides a one to one relation of fds to queues and does not support the vectors option.
Okay, ACK.
I'll just add that sentence to the commit log message and push it. No need to respin.
Thanks!
Laine, please also cleanup the line Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.comCornelia Huck <cornelia.huck@de.ibm.com>> which I accidentally screwed up. -- Mit freundlichen Grüßen/Kind regards Boris Fiuczynski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

On 05/06/2015 11:35 AM, Boris Fiuczynski wrote:
On 05/06/2015 05:32 PM, Laine Stump wrote:
On 05/06/2015 11:20 AM, Boris Fiuczynski wrote:
On 05/06/2015 05:02 PM, Laine Stump wrote:
On 05/06/2015 10:07 AM, Boris Fiuczynski wrote:
Allow ccw devices to be used with multiqueues. Can you provide a bit more information in the commit log on the reason for this difference? Is the vectors= option not supported when using the ccw bus? Or is is simply not needed because it's determined automatically based on the number of fd's that are passed in?
Sure and sorry about the short commit log. ccw provides a one to one relation of fds to queues and does not support the vectors option.
Okay, ACK.
I'll just add that sentence to the commit log message and push it. No need to respin.
Thanks!
Laine, please also cleanup the line Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.comCornelia Huck <cornelia.huck@de.ibm.com>> which I accidentally screwed up.
Sure. I also just noticed while running "make syntax-check" that you called virBufferAsprintf() on a string with no format characters; I'm replacing that with a call to virBufferAddLit().
participants (2)
-
Boris Fiuczynski
-
Laine Stump