From: Dominik Budzowski <dominik@budzowski.pl>
To: pve-devel@lists.proxmox.com
Cc: Dominik Budzowski <dominik@budzowski.pl>
Subject: [PATCH pve-manager] ui: qemu: HDEdit: add iothread-vq-mapping UI controls
Date: Fri, 5 Jun 2026 17:15:45 +0200 [thread overview]
Message-ID: <20260605151545.6622-1-dominik@budzowski.pl> (raw)
Add a 'VQ Mapping' checkbox and 'VQ count' integer field (2-16) to the
hard disk edit panel. When VQ Mapping is enabled, the standard IO thread
checkbox is disabled (they are mutually exclusive), and the selected count
is stored as iothread_vq_mapping on the drive config.
Loading an existing drive with iothread_vq_mapping set pre-selects the
VQ Mapping checkbox and restores the count value.
Resolves: https://bugzilla.proxmox.com/show_bug.cgi?id=6350
Signed-off-by: Dominik Budzowski <dominik@budzowski.pl>
---
www/manager6/qemu/HDEdit.js | 59 ++++++++++++++++++++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index 1bb2bfd..7f52f5c 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -92,7 +92,11 @@ Ext.define('PVE.qemu.HDInputPanel', {
PVE.Utils.propertyStringSet(me.drive, values.noreplicate, 'replicate', 'no');
PVE.Utils.propertyStringSet(me.drive, values.discard, 'discard', 'on');
PVE.Utils.propertyStringSet(me.drive, values.ssd, 'ssd', 'on');
- PVE.Utils.propertyStringSet(me.drive, values.iothread, 'iothread', 'on');
+ let vqCb = me.down('[name=vq_mapping_enabled]');
+ let vqField = me.down('[name=iothread_vq_mapping]');
+ let vqCount = (vqCb && !vqCb.disabled && vqCb.getValue() && vqField) ? vqField.getValue() : undefined;
+ PVE.Utils.propertyStringSet(me.drive, vqCount ? undefined : values.iothread, 'iothread', 'on');
+ PVE.Utils.propertyStringSet(me.drive, vqCount || undefined, 'iothread_vq_mapping');
PVE.Utils.propertyStringSet(me.drive, values.readOnly, 'ro', 'on');
PVE.Utils.propertyStringSet(me.drive, values.cache, 'cache');
PVE.Utils.propertyStringSet(me.drive, values.aio, 'aio');
@@ -154,6 +158,8 @@ Ext.define('PVE.qemu.HDInputPanel', {
values.discard = drive.discard === 'on';
values.ssd = PVE.Parser.parseBoolean(drive.ssd);
values.iothread = PVE.Parser.parseBoolean(drive.iothread);
+ values.vq_mapping_enabled = !!drive.iothread_vq_mapping;
+ values.iothread_vq_mapping = drive.iothread_vq_mapping ? parseInt(drive.iothread_vq_mapping, 10) : 4;
values.readOnly = PVE.Parser.parseBoolean(drive.ro);
values.aio = drive.aio || '__default__';
@@ -332,6 +338,57 @@ Ext.define('PVE.qemu.HDInputPanel', {
: {
disabled: '{!isVirtIO && !isSCSI}',
},
+ listeners: {
+ change: function(cb, val) {
+ let win = cb.up('window');
+ let vqCb = win.down('[name=vq_mapping_enabled]');
+ let countField = win.down('[name=iothread_vq_mapping]');
+ if (vqCb) {
+ vqCb.setDisabled(!!val);
+ if (val && vqCb.getValue()) {
+ vqCb.setValue(false);
+ if (countField) countField.setDisabled(true);
+ }
+ }
+ },
+ },
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'vq_mapping_enabled',
+ fieldLabel: 'VQ Mapping',
+ submitValue: false,
+ clearOnDisable: true,
+ bind: {
+ disabled: '{!isVirtIO && !isSCSI}',
+ },
+ listeners: {
+ change: function(cb, val) {
+ let win = cb.up('window');
+ let countField = win.down('[name=iothread_vq_mapping]');
+ if (countField) {
+ countField.setDisabled(!val);
+ if (!val) countField.setValue(4);
+ }
+ let iothreadCb = win.down('[name=iothread]');
+ if (iothreadCb) {
+ iothreadCb.setDisabled(!!val);
+ if (val && iothreadCb.getValue()) {
+ iothreadCb.setValue(false);
+ }
+ }
+ },
+ },
+ },
+ {
+ xtype: 'proxmoxintegerfield',
+ name: 'iothread_vq_mapping',
+ fieldLabel: 'VQ count',
+ minValue: 2,
+ maxValue: 16,
+ value: 4,
+ disabled: true,
+ allowBlank: false,
},
);
--
2.47.3
reply other threads:[~2026-06-05 19:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260605151545.6622-1-dominik@budzowski.pl \
--to=dominik@budzowski.pl \
--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 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.