48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From 7208c85b822d45410d21ec42acdc872550a57262 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
|
Date: Tue, 10 Jun 2025 13:36:53 +0100
|
|
Subject: [PATCH 16/31] hw/dma/xlnx_csu_dma: skip automatic zero-init of large
|
|
array
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
RH-Author: Stefan Hajnoczi <stefanha@redhat.com>
|
|
RH-MergeRequest: 461: Solve -ftrivial-auto-var-init performance regression with QEMU_UNINITIALIZED
|
|
RH-Jira: RHEL-99887
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Commit: [15/30] 8ffc738b76ad72de3d0925c5e44408b0f712fcef
|
|
|
|
The 'xlnx_csu_dma_src_notify' method has a 4k byte array used for
|
|
copying DMA data. Skip the automatic zero-init of this array to
|
|
eliminate the performance overhead in the I/O hot path.
|
|
|
|
The 'buf' array will be fully initialized when data is copied.
|
|
|
|
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
Message-id: 20250610123709.835102-16-berrange@redhat.com
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
(cherry picked from commit ce14f24611aa0469b464a9512e192b4fd51dca2b)
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
---
|
|
hw/dma/xlnx_csu_dma.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c
|
|
index ae307482f2..9d1cccc5ca 100644
|
|
--- a/hw/dma/xlnx_csu_dma.c
|
|
+++ b/hw/dma/xlnx_csu_dma.c
|
|
@@ -287,7 +287,7 @@ static uint32_t xlnx_csu_dma_advance(XlnxCSUDMA *s, uint32_t len)
|
|
static void xlnx_csu_dma_src_notify(void *opaque)
|
|
{
|
|
XlnxCSUDMA *s = XLNX_CSU_DMA(opaque);
|
|
- unsigned char buf[4 * 1024];
|
|
+ QEMU_UNINITIALIZED unsigned char buf[4 * 1024];
|
|
size_t rlen = 0;
|
|
|
|
ptimer_transaction_begin(s->src_timer);
|
|
--
|
|
2.39.3
|
|
|