aboutgitcodebugslistschat
path: root/vu_common.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-02-16 08:16:33 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-02-17 08:27:30 +0100
commit667caa09c6d46d937b3076254176eded262b3eca (patch)
treefc8cfbf3de22a02a7055a1d6ec742d62721e78cf /vu_common.c
parent7c33b1208632a9581d0ee7aabd1e0584a5d1fb20 (diff)
downloadpasst-667caa09c6d46d937b3076254176eded262b3eca.tar
passt-667caa09c6d46d937b3076254176eded262b3eca.tar.gz
passt-667caa09c6d46d937b3076254176eded262b3eca.tar.bz2
passt-667caa09c6d46d937b3076254176eded262b3eca.tar.lz
passt-667caa09c6d46d937b3076254176eded262b3eca.tar.xz
passt-667caa09c6d46d937b3076254176eded262b3eca.tar.zst
passt-667caa09c6d46d937b3076254176eded262b3eca.zip
tcp_splice: Don't wake up on input data if we can't write it anywhere
If we set the OUT_WAIT_* flag (waiting on EPOLLOUT) for a side of a given flow, it means that we're blocked, waiting for the receiver to actually receive data, with a full pipe. In that case, if we keep EPOLLIN set for the socket on the other side (our receiving side), we'll get into a loop such as: 41.0230: pasta: epoll event on connected spliced TCP socket 108 (events: 0x00000001) 41.0230: Flow 1 (TCP connection (spliced)): -1 from read-side call 41.0230: Flow 1 (TCP connection (spliced)): -1 from write-side call (passed 8192) 41.0230: Flow 1 (TCP connection (spliced)): event at tcp_splice_sock_handler:577 41.0230: pasta: epoll event on connected spliced TCP socket 108 (events: 0x00000001) 41.0230: Flow 1 (TCP connection (spliced)): -1 from read-side call 41.0230: Flow 1 (TCP connection (spliced)): -1 from write-side call (passed 8192) 41.0230: Flow 1 (TCP connection (spliced)): event at tcp_splice_sock_handler:577 leading to 100% CPU usage, of course. Drop EPOLLIN on our receiving side as long when we're waiting for output readiness on the other side. Link: https://github.com/containers/podman/issues/23686#issuecomment-2661036584 Link: https://www.reddit.com/r/podman/comments/1iph50j/pasta_high_cpu_on_podman_rootless_container/ Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'vu_common.c')
0 files changed, 0 insertions, 0 deletions