public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 2/6] virtio-blk: add queues option
Date: Thu,  9 Mar 2023 09:52:13 +0100	[thread overview]
Message-ID: <20230309085217.3649203-3-aderumier@odiso.com> (raw)
In-Reply-To: <20230309085217.3649203-1-aderumier@odiso.com>

We already added support for virtio-scsi some years ago,
but forget to add it for virtio-blk

Note that qemu attribute in "num-queues" for virtio-blk,

instaed "num_queues"  for virtio-scsi

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/QemuServer.pm       | 1 +
 PVE/QemuServer/Drive.pm | 1 +
 2 files changed, 2 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 40be44d..deb7faf 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1505,6 +1505,7 @@ sub print_drivedevice_full {
 	my $pciaddr = print_pci_addr("$drive_id", $bridges, $arch, $machine_type);
 	$device = "virtio-blk-pci,drive=drive-$drive_id,id=${drive_id}${pciaddr}";
 	$device .= ",iothread=iothread-$drive_id" if $drive->{iothread};
+	$device .= ",num-queues=$drive->{queues}" if $drive->{queues};
     } elsif ($drive->{interface} eq 'scsi') {
 
 	my ($maxdev, $controller, $controller_prefix) = scsihw_infos($conf, $drive);
diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index b0e0a96..cd2823a 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -304,6 +304,7 @@ PVE::JSONSchema::register_standard_option("pve-qm-sata", $satadesc);
 my $virtio_fmt = {
     %drivedesc_base,
     %iothread_fmt,
+    %queues_fmt,
     %readonly_fmt,
 };
 my $virtiodesc = {
-- 
2.30.2




  parent reply	other threads:[~2023-03-09  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  8:52 [pve-devel] [PATCH qemu-server 0/6] improve virtio drive multiqueues Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 1/6] add virtio-scsi && virtio-scsi-single tests Alexandre Derumier
2023-03-09  8:52 ` Alexandre Derumier [this message]
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 3/6] cpuconfig: add get_cpu_topology helper Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 4/6] fix #4295 : virtio-(blk|scsi): enable multiqueue by default Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 5/6] drive: allow minimum queues = 1 Alexandre Derumier
2023-03-09  8:52 ` [pve-devel] [PATCH qemu-server 6/6] add virtio-blk|scsi default multiqueue tests Alexandre Derumier

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=20230309085217.3649203-3-aderumier@odiso.com \
    --to=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal