public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] cfg2cmd/drive: don't use io_uring for krbd with wb/wt cache
@ 2021-06-30 15:18 Stefan Reiter
  2021-07-01  7:41 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Reiter @ 2021-06-30 15:18 UTC (permalink / raw)
  To: pve-devel

As reported here and locally reproduced:
https://forum.proxmox.com/threads/efi-vms-wont-start-under-7-beta-with-writeback-cache.91629/

This configuration is currently broken. Until we figure out how to fix
it properly, we can just have this (luckily very narrow) config pattern
fall back to aio=threads as it used to.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
---

I tried my usual QEMU debugging routine, but couldn't figure anything specific
out - it's not related to EFI, happens on SeaBIOS too, but looking at GDB just
appears that it's waiting for the io_uring fd to become ready (in ppoll)...
I did also test with a newer liburing (2.0 from git) but it didn't help.

Anyway, until I figure it out (which may not happen until the release), let's
work around with this, we can always roll this back later, as it doesn't break
migration/snapshots to change 'aio' type.

The forum post mentioned other SCSI controllers fixing the issue too, but that
just confuses me even more, and we don't have that information available for
cheap here, so I just made it fall back for all of them.

 PVE/QemuServer.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 8af4176..f760467 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1600,8 +1600,11 @@ sub print_drive_commandline_full {
 	$cache_direct = 1;
     }
 
+    # io_uring with cache mode writeback or writethrough on krbd will hang...
+    my $rbd_no_io_uring = $scfg && $scfg->{type} eq 'rbd' && $scfg->{krbd} && !$cache_direct;
+
     if (!$drive->{aio}) {
-	if ($io_uring) {
+	if ($io_uring && !$rbd_no_io_uring) {
 	    # io_uring supports all cache modes
 	    $opts .= ",aio=io_uring";
 	} else {
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] cfg2cmd/drive: don't use io_uring for krbd with wb/wt cache
  2021-06-30 15:18 [pve-devel] [PATCH qemu-server] cfg2cmd/drive: don't use io_uring for krbd with wb/wt cache Stefan Reiter
@ 2021-07-01  7:41 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-07-01  7:41 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stefan Reiter

On 30.06.21 17:18, Stefan Reiter wrote:
> As reported here and locally reproduced:
> https://forum.proxmox.com/threads/efi-vms-wont-start-under-7-beta-with-writeback-cache.91629/
> 
> This configuration is currently broken. Until we figure out how to fix
> it properly, we can just have this (luckily very narrow) config pattern
> fall back to aio=threads as it used to.
> 
> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
> ---
> 
> I tried my usual QEMU debugging routine, but couldn't figure anything specific
> out - it's not related to EFI, happens on SeaBIOS too, but looking at GDB just
> appears that it's waiting for the io_uring fd to become ready (in ppoll)...
> I did also test with a newer liburing (2.0 from git) but it didn't help.
> 
> Anyway, until I figure it out (which may not happen until the release), let's
> work around with this, we can always roll this back later, as it doesn't break
> migration/snapshots to change 'aio' type.
> 
> The forum post mentioned other SCSI controllers fixing the issue too, but that
> just confuses me even more, and we don't have that information available for
> cheap here, so I just made it fall back for all of them.
> 

weird stuff...

>  PVE/QemuServer.pm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
>

applied for now, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-01  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 15:18 [pve-devel] [PATCH qemu-server] cfg2cmd/drive: don't use io_uring for krbd with wb/wt cache Stefan Reiter
2021-07-01  7:41 ` [pve-devel] applied: " Thomas Lamprecht

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