* I/O performance regression between 9.0.2 and 11.1.3 on Xen
@ 2026-11-25 11:37 Marek Marczykowski-Górecki
2026-11-25 13:52 ` Edgar E. Iglesias
0 siblings, 1 reply; 3+ messages in thread
From: Marek Marczykowski-Górecki @ 2026-11-25 11:37 UTC (permalink / raw)
To: qemu-devel, Edgar E. Iglesias
Cc: xen-devel, Stefano Stabellini, Anthony PERARD
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]
Hi,
After updating QEMU in a stubdomain on Qubes OS (Xen)[1], I got severe
performance regression. The benchmark I noticed it on is Windows
installation time - the first phase (until first reboot) went from
~7 min up to ~30 min. The version range isn't exactly trivial, but on
the other hand the issue is 100% reliable, so I easily bisected it. The
result:
123acd816dccbd358570ec7ab79c5cb2c863780b is the first bad commit
commit 123acd816dccbd358570ec7ab79c5cb2c863780b
Author: Edgar E. Iglesias <edgar.iglesias@amd.com>
Date: Mon Apr 29 19:12:42 2024 +0200
xen: mapcache: Unmap first entries in buckets
When invalidating memory ranges, if we happen to hit the first
entry in a bucket we were never unmapping it. This was harmless
for foreign mappings but now that we're looking to reuse the
mapcache for transient grant mappings, we must unmap entries
when invalidated.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
hw/xen/xen-mapcache.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
And indeed, reverting it on top of 11.1.3 fixes the issue. I assume that
page gets mapped and unmapped a lot (for disk I/O?).
Let me know if some more information is needed, some logs to collect
maybe? Or a simplified test case?
[1] https://github.com/QubesOS/qubes-vmm-xen-stubdom-linux/pull/77
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: I/O performance regression between 9.0.2 and 11.1.3 on Xen
2026-11-25 11:37 I/O performance regression between 9.0.2 and 11.1.3 on Xen Marek Marczykowski-Górecki
@ 2026-11-25 13:52 ` Edgar E. Iglesias
2026-11-25 14:13 ` Marek Marczykowski-Górecki
0 siblings, 1 reply; 3+ messages in thread
From: Edgar E. Iglesias @ 2026-11-25 13:52 UTC (permalink / raw)
To: Marek Marczykowski-Górecki
Cc: qemu-devel, xen-devel, Stefano Stabellini, Anthony PERARD
On Wed, Nov 25, 2026 at 12:37:22PM +0100, Marek Marczykowski-Górecki wrote:
> And indeed, reverting it on top of 11.1.3 fixes the issue. I assume that
> page gets mapped and unmapped a lot (for disk I/O?).
> Let me know if some more information is needed, some logs to collect
> maybe? Or a simplified test case?
Hi Marek,
Thanks for bisecting this. We hit the same slowdown and carry a patch
that keeps foreign DMA mappings cached after their last user releases
them. That lets repeated I/O to the same guest pages reuse the mapping.
I have the patch queued for upstreaming. It’s on the edgar/xen-pvh-fixes
branch in my tree.
3386b77e09 xen-mapcache: Keep released DMA mappings cached
https://github.com/edgarigl/qemu/commit/3386b77e09e194ffc921c79f28241de8e5545748
Could you try it on QEMU 11.1.3 with 123acd816dcc still applied and let
us know whether the Windows install is back to around 7 minutes to
first reboot?
Thanks,
Edgar
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: I/O performance regression between 9.0.2 and 11.1.3 on Xen
2026-11-25 13:52 ` Edgar E. Iglesias
@ 2026-11-25 14:13 ` Marek Marczykowski-Górecki
0 siblings, 0 replies; 3+ messages in thread
From: Marek Marczykowski-Górecki @ 2026-11-25 14:13 UTC (permalink / raw)
To: Edgar E. Iglesias
Cc: qemu-devel, xen-devel, Stefano Stabellini, Anthony PERARD
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
On Wed, Nov 25, 2026 at 02:52:12PM +0100, Edgar E. Iglesias wrote:
> On Wed, Nov 25, 2026 at 12:37:22PM +0100, Marek Marczykowski-Górecki wrote:
> > And indeed, reverting it on top of 11.1.3 fixes the issue. I assume that
> > page gets mapped and unmapped a lot (for disk I/O?).
> > Let me know if some more information is needed, some logs to collect
> > maybe? Or a simplified test case?
>
> Hi Marek,
>
> Thanks for bisecting this. We hit the same slowdown and carry a patch
> that keeps foreign DMA mappings cached after their last user releases
> them. That lets repeated I/O to the same guest pages reuse the mapping.
>
> I have the patch queued for upstreaming. It’s on the edgar/xen-pvh-fixes
> branch in my tree.
>
> 3386b77e09 xen-mapcache: Keep released DMA mappings cached
> https://github.com/edgarigl/qemu/commit/3386b77e09e194ffc921c79f28241de8e5545748
>
> Could you try it on QEMU 11.1.3 with 123acd816dcc still applied and let
> us know whether the Windows install is back to around 7 minutes to
> first reboot?
Yes, that works too, thanks! You can consider it as my Tested-by.
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-25 14:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 11:37 I/O performance regression between 9.0.2 and 11.1.3 on Xen Marek Marczykowski-Górecki
2026-11-25 13:52 ` Edgar E. Iglesias
2026-11-25 14:13 ` Marek Marczykowski-Górecki
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.