From: Jens Axboe Date: Tue, 9 Feb 2021 20:48:50 +0000 (-0700) Subject: io_uring: enable kmemcg account for io_uring requests X-Git-Tag: accepted/tizen/unified/20230118.172025~7716^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91f245d5d5de0802428a478802ec051f7de2f5d6;p=platform%2Fkernel%2Flinux-rpi.git io_uring: enable kmemcg account for io_uring requests This puts io_uring under the memory cgroups accounting and limits for requests. Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 2c7ff0b..bffed6a 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -10350,7 +10350,8 @@ static int __init io_uring_init(void) BUILD_BUG_ON(ARRAY_SIZE(io_op_defs) != IORING_OP_LAST); BUILD_BUG_ON(__REQ_F_LAST_BIT >= 8 * sizeof(int)); - req_cachep = KMEM_CACHE(io_kiocb, SLAB_HWCACHE_ALIGN | SLAB_PANIC); + req_cachep = KMEM_CACHE(io_kiocb, SLAB_HWCACHE_ALIGN | SLAB_PANIC | + SLAB_ACCOUNT); return 0; }; __initcall(io_uring_init);