summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-05-09 12:12:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-27 11:08:43 +0100
commita8b5ef355477348861a3bff9567d2cc5d0515b7c (patch)
tree3209cf76b41438c32415e250276eeeb8991b45dd /io_uring
parentabf80985f4d667644d0959887e7e132f6761568f (diff)
downloadlinux-a8b5ef355477348861a3bff9567d2cc5d0515b7c.tar.gz
linux-a8b5ef355477348861a3bff9567d2cc5d0515b7c.tar.bz2
linux-a8b5ef355477348861a3bff9567d2cc5d0515b7c.zip
io_uring: account drain memory to cgroup
commit f979c20547e72568e3c793bc92c7522bc3166246 upstream. Account drain allocations against memcg. It's not a big problem as each such allocation is paired with a request, which is accounted, but it's nicer to follow the limits more closely. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/f8dfdbd755c41fd9c75d12b858af07dfba5bbb68.1746788718.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index ff1a93d405e9..897f07014c01 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1808,7 +1808,7 @@ queue:
spin_unlock(&ctx->completion_lock);
io_prep_async_link(req);
- de = kmalloc(sizeof(*de), GFP_KERNEL);
+ de = kmalloc(sizeof(*de), GFP_KERNEL_ACCOUNT);
if (!de) {
ret = -ENOMEM;
io_req_defer_failed(req, ret);