From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server/storage 0/6] fix #5779: introduce guest hints to pass rxbounce flag to KRBD
Date: Fri, 31 Oct 2025 11:36:07 +0100 [thread overview]
Message-ID: <20251031103709.60233-1-f.weber@proxmox.com> (raw)
When using Windows VMs with KRBD, it can be necessary to pass the rxbounce
option to `rbd map` to avoid "bad crc/signature" warnings in the journal,
retransmits and degraded performance. A first attempt to allow this [0] added
an rxbounce storage option, but Thomas pointed out that this might nudge users
towards creating two storages pointing to the same Ceph pool (one for Linux VMs
that do not need rxbounce, one for Windows VMs that need rxbounce), which we
should discourage.
The cleanest solution from the user POV would be that PVE passes rxbounce only
when mapping disks of VMs with Windows OS type, but this is not straightforward
to implement, as pve-storage currently does not have knowledge about the
"owner" of the volumes it activates. Fabian and Thomas suggested an approach to
pass well-defined "hints" from e.g. qemu-server to pve-storage [0], one of
which could be the guest's OS type, and based on which the RBD plugin could
decide whether to pass rxbounce or not. We'd need to take care to avoid too
much coupling between qemu-server and pve-storage, though.
This patch series implements such hints. It builds upon an RFC [rfc] and some
off-list discussion with Fiona (summary [1]).
PVE::Storage::{activate,map}_volume now accept an additional optional parameter
$hints that will be passed down to the storage plugin, where
{activate,map}_volume also get an additional optional parameter $hints. This
requires an plugin API bump but is backwards-compatible. Callers can use hints
to pass well-defined information from upper layers to the storage layer.
See patches for details.
The Boolean 'guest-is-windows' hint denotes whether the to-be-activated volumes
belong to a Windows guest. The RBD plugin uses that hint to decide whether to
pass rxbounce when mapping a volume. The Boolean 'plugin-may-deactivate-volume'
hint denotes whether the plugin may deactivate and re-activate the volume in
order to apply the hint (this is necessary for rxbounce if the volume is
already mapped), see patches for details.
Currently, hints are only passed on VM start, as they are currently only
relevant for rxbounce, and rxbounce is only relevant for VM start. This is to
avoid having to update the many direct/indirect callsites of activate_volume.
If needed in the future for other hints, we can still pass hints at more
callsites.
Since VM start is also used for backups, this means rxbounce is currently
unnecessarily passed when mapping volumes for a backup of a stopped VM, but I
think this is OK.
Fiona and I discussed [1] that we could pass hints at some more callsites
already now to save us some unmapping+mapping to apply rxbounce, e.g. for live
restore. I took a look at it, but since generating hints requires the VM config
which is currently assembled after volume activation, it looks like it would
require some code restructuring, and I decided to postpone that in order to get
a v1 out quicker. Can still take a look at it for the next version of the patch
series if wanted.
changes since rfc:
- move hint definition, verify_hints and is_hint_supported to PVE::Storage::Plugin
to make it less awkward to access for storage plugins -- not sure if this
is needed?
- add 'plugin-may-deactivate-volume' hint
- only pass hints at VM start
- RBD plugin: if the volume is already active, is not mapped with rxbounce but
should be, and it is safe to deactivate: deactivate it to apply rxbounce.
rfc: https://lore.proxmox.com/pve-devel/20251024122705.93761-1-f.weber@proxmox.com/
[0] https://lore.proxmox.com/pve-devel/20241025111304.99680-2-f.weber@proxmox.com/T/
[1] https://lore.proxmox.com/pve-devel/a6558cbe-7dea-4dbb-8c50-97753f2b0fda@proxmox.com/
storage:
Friedrich Weber (5):
plugin: introduce hints for activating and mapping volumes
plugin api: bump api version and age
storage: activate/map volumes: verify and pass hints to plugin
plugin: rbd: factor out subroutine to obtain RBD ID
plugin: rbd: pass rxbounce when mapping Windows VM guest volumes
ApiChangeLog | 42 +++++++++++++++++++++++++++++
src/PVE/Storage.pm | 16 ++++++-----
src/PVE/Storage/Plugin.pm | 43 +++++++++++++++++++++++++++--
src/PVE/Storage/RBDPlugin.pm | 52 +++++++++++++++++++++++++++++++-----
4 files changed, 139 insertions(+), 14 deletions(-)
qemu-server:
Friedrich Weber (1):
fix #5779: vm start: pass storage hints when activating guest volumes
src/PVE/QemuServer.pm | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
Summary over all repositories:
5 files changed, 157 insertions(+), 15 deletions(-)
--
Generated by git-murpp 0.8.1
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-10-31 10:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 10:36 Friedrich Weber [this message]
2025-10-31 10:36 ` [pve-devel] [PATCH storage 1/5] plugin: introduce hints for activating and mapping volumes Friedrich Weber
2025-10-31 10:36 ` [pve-devel] [PATCH storage 2/5] plugin api: bump api version and age Friedrich Weber
2025-10-31 10:36 ` [pve-devel] [PATCH storage 3/5] storage: activate/map volumes: verify and pass hints to plugin Friedrich Weber
2025-10-31 10:36 ` [pve-devel] [PATCH storage 4/5] plugin: rbd: factor out subroutine to obtain RBD ID Friedrich Weber
2025-10-31 10:36 ` [pve-devel] [PATCH storage 5/5] plugin: rbd: pass rxbounce when mapping Windows VM guest volumes Friedrich Weber
2025-10-31 10:36 ` [pve-devel] [PATCH qemu-server 1/1] fix #5779: vm start: pass storage hints when activating " Friedrich Weber
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=20251031103709.60233-1-f.weber@proxmox.com \
--to=f.weber@proxmox.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 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.