summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2026-09-08 17:03:12 +0000
committerJens Axboe <axboe@kernel.dk>2026-09-28 11:47:31 -0600
commitfffb79350f9e653a9318bd4de09d98d9cbdbc537 (patch)
tree5852e5e851e06e266553435484fea6f5737fc2ba /include/linux
parent8d1c3a1f2fd7a1f396dbb3824779b62531d98649 (diff)
io_uring/notif: count pending zerocopy notifications per ring
SEND_ZC notifications are io_kiocbs like any other as far as request and task accounting goes, but they are special in that they cannot be canceled and only complete once the network stack is done with the data. With an unresponsive peer, that can take a while. The exit and release paths are about to start waiting for requests to finish so that the files they pin get released in a timely manner, and notifications neither pin files nor finish in a timely manner. Keep a per-ring count of them so those paths can leave them out. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/io_uring_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index 39629ee77b91..90fea94ad202 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -522,6 +522,8 @@ struct io_ring_ctx {
/* protected by ->completion_lock */
unsigned nr_req_allocated;
+ /* pending SEND_ZC notifications, protected by ->uring_lock */
+ unsigned nr_notifs;
#ifdef CONFIG_NET_RX_BUSY_POLL
struct list_head napi_list; /* track busy poll napi_id */