diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-02-09 21:48:50 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-10 15:33:15 +0100 |
commit | 91f245d5d5de0802428a478802ec051f7de2f5d6 (patch) | |
tree | 6ba433884c98499e1b176c446cd821959c8ffbca /fs | |
parent | io_uring: enable req cache for IRQ driven IO (diff) | |
download | linux-91f245d5d5de0802428a478802ec051f7de2f5d6.tar.xz linux-91f245d5d5de0802428a478802ec051f7de2f5d6.zip |
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 <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 2c7ff0b1b086..bffed6aa5722 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); |