From: Daniel P. Berrangé <[email protected]> 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é <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Klaus Jensen <[email protected]> Reviewed-by: Harsh Prateek Bora <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]> --- 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
