You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/include/io
Manish Mishra 84005f4a2b io: flush zerocopy socket error queue on sendmsg failure due to ENOBUF
The kernel allocates extra metadata SKBs in case of a zerocopy send,
eventually used for zerocopy's notification mechanism. This metadata
memory is accounted for in the OPTMEM limit. The kernel queues
completion notifications on the socket error queue and this error queue
is freed when userspace reads it.

Usually, in the case of in-order processing, the kernel will batch the
notifications and merge the metadata into a single SKB and free the
rest. As a result, it never exceeds the OPTMEM limit. However, if there
is any out-of-order processing or intermittent zerocopy failures, this
error chain can grow significantly, exhausting the OPTMEM limit. As a
result, all new sendmsg requests fail to allocate any new SKB, leading
to an ENOBUF error. Depending on the amount of data queued before the
flush (i.e., large live migration iterations), even large OPTMEM limits
are prone to failure.

To work around this, if we encounter an ENOBUF error with a zerocopy
sendmsg, flush the error queue and retry once more.

Co-authored-by: Manish Mishra <manish.mishra@nutanix.com>
Signed-off-by: Tejus GK <tejus.gk@nutanix.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[DB: change TRUE/FALSE to true/false for 'bool' type;
     add more #ifdef QEMU_MSG_ZEROCOPY blocks]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 days ago
..
channel-buffer.h io: Fix Lesser GPL version number 5 years ago
channel-command.h io/command: implement support for win32 3 years ago
channel-file.h io: Introduce qio_channel_file_new_dupfd 2 years ago
channel-null.h io: add a QIOChannelNull equivalent to /dev/null 3 years ago
channel-socket.h io: flush zerocopy socket error queue on sendmsg failure due to ENOBUF 2 days ago
channel-tls.h io: tls: Add qio_channel_tls_bye 9 months ago
channel-util.h io: follow coroutine AioContext in qio_channel_yield() 2 years ago
channel-watch.h io: Fix Lesser GPL version number 5 years ago
channel-websock.h io: fix use after free in websocket handshake code 2 weeks ago
channel.h io/channel: Have read/write functions take void * buffer argument 2 days ago
dns-resolver.h io: Fix Lesser GPL version number 5 years ago
net-listener.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 5 years ago
task.h Rename "QEMU global mutex" to "BQL" in comments and docs 2 years ago