[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 31/31] net/stream: skip automatic zero-init of large array
From: |
Daniel P . Berrangé |
Subject: |
[PATCH 31/31] net/stream: skip automatic zero-init of large array |
Date: |
Tue, 10 Jun 2025 13:37:09 +0100 |
The 'net_stream_send' method has a 68k byte array used for copying
data between guest and host. Skip the automatic zero-init of this
array to eliminate the performance overhead in the I/O hot path.
The 'buf1' array will be fully initialized when reading data off
the network socket.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
net/stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/stream.c b/net/stream.c
index 4de5613844..6152d2a05e 100644
--- a/net/stream.c
+++ b/net/stream.c
@@ -148,7 +148,7 @@ static gboolean net_stream_send(QIOChannel *ioc,
NetStreamState *s = data;
int size;
int ret;
- char buf1[NET_BUFSIZE];
+ QEMU_UNINITIALIZED char buf1[NET_BUFSIZE];
const char *buf;
size = qio_channel_read(s->ioc, buf1, sizeof(buf1), NULL);
--
2.49.0
- [PATCH 17/31] hw/hyperv/syndbg: skip automatic zero-init of large array, (continued)
- [PATCH 17/31] hw/hyperv/syndbg: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 19/31] hw/net/rtl8139: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 18/31] hw/misc/aspeed_hace: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 21/31] hw/net/virtio-net: skip automatic zero-init of large arrays, Daniel P . Berrangé, 2025/06/10
- [PATCH 15/31] hw/dma/xlnx_csu_dma: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 14/31] hw/char/sclpconsole-lm: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 27/31] hw/scsi/lsi53c895a: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 25/31] hw/ppc/spapr_tpm_proxy: skip automatic zero-init of large arrays, Daniel P . Berrangé, 2025/06/10
- [PATCH 29/31] hw/ufs/lu: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 31/31] net/stream: skip automatic zero-init of large array,
Daniel P . Berrangé <=
- [PATCH 16/31] hw/display/vmware_vga: skip automatic zero-init of large struct, Daniel P . Berrangé, 2025/06/10
- [PATCH 20/31] hw/net/tulip: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 22/31] hw/net/xgamc: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 12/31] hw/audio/sb16: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 26/31] hw/usb/hcd-ohci: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 23/31] hw/nvme/ctrl: skip automatic zero-init of large arrays, Daniel P . Berrangé, 2025/06/10
- [PATCH 24/31] hw/ppc/pnv_occ: skip automatic zero-init of large struct, Daniel P . Berrangé, 2025/06/10
- [PATCH 28/31] hw/scsi/megasas: skip automatic zero-init of large arrays, Daniel P . Berrangé, 2025/06/10