diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-05-09 12:12:47 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 11:07:26 +0100 |
| commit | 5300048e6d3fcf7b3eee04de4b641716bf73bd7e (patch) | |
| tree | ecd0a43aa420a79228723cdb1e6b133465c6baaa /io_uring/io_uring.c | |
| parent | bd9b3f831263215966b067ab755a167b48cd8dc3 (diff) | |
| download | linux-5300048e6d3fcf7b3eee04de4b641716bf73bd7e.tar.gz linux-5300048e6d3fcf7b3eee04de4b641716bf73bd7e.tar.bz2 linux-5300048e6d3fcf7b3eee04de4b641716bf73bd7e.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/io_uring.c')
| -rw-r--r-- | io_uring/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index abefc334cf7d..29adfc6d6ec2 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1654,7 +1654,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_complete_failed(req, ret); |
