[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/31] block: skip automatic zero-init of large array in ioq_subm
From: |
Daniel P . Berrangé |
Subject: |
[PATCH 03/31] block: skip automatic zero-init of large array in ioq_submit |
Date: |
Tue, 10 Jun 2025 13:36:41 +0100 |
The 'ioq_submit' method has a struct array that is 8k in size.
Skip the automatic zero-init of this array to eliminate the
performance overhead in the I/O hot path.
The 'iocbs' array will selectively initialized when processing
the I/O data.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
block/linux-aio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/linux-aio.c b/block/linux-aio.c
index 407369f5c9..c200e7ad20 100644
--- a/block/linux-aio.c
+++ b/block/linux-aio.c
@@ -291,7 +291,7 @@ static void ioq_submit(LinuxAioState *s)
{
int ret, len;
struct qemu_laiocb *aiocb;
- struct iocb *iocbs[MAX_EVENTS];
+ QEMU_UNINITIALIZED struct iocb *iocbs[MAX_EVENTS];
QSIMPLEQ_HEAD(, qemu_laiocb) completed;
do {
--
2.49.0
- [PATCH 00/31] Skip automatic zero-init of large arrays / structs in I/O paths, Daniel P . Berrangé, 2025/06/10
- [PATCH 01/31] include/qemu/compiler: add QEMU_UNINITIALIZED attribute macro, Daniel P . Berrangé, 2025/06/10
- [PATCH 02/31] hw/virtio/virtio: avoid cost of -ftrivial-auto-var-init in hot path, Daniel P . Berrangé, 2025/06/10
- [PATCH 03/31] block: skip automatic zero-init of large array in ioq_submit,
Daniel P . Berrangé <=
- [PATCH 05/31] chardev/char-pty: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 04/31] chardev/char-fd: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 07/31] hw/audio/ac97: skip automatic zero-init of large arrays, Daniel P . Berrangé, 2025/06/10
- [PATCH 06/31] chardev/char-socket: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 09/31] hw/audio/es1370: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 08/31] hw/audio/cs4231a: skip automatic zero-init of large arrays, Daniel P . Berrangé, 2025/06/10
- [PATCH 10/31] hw/audio/gus: 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 15/31] hw/dma/xlnx_csu_dma: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10
- [PATCH 11/31] hw/audio/gus: skip automatic zero-init of large array, Daniel P . Berrangé, 2025/06/10