io_uring: place ring SQ/CQ arrays under memcg memory limits
authorJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 03:14:12 +0000 (20:14 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 14:33:15 +0000 (07:33 -0700)
commit26bfa89e25f42d2b26fe951bbcf04bb13937fbba
treedbf937a84c7d83c2ae17c4affd6ad335b0d38c9c
parent91f245d5d5de0802428a478802ec051f7de2f5d6
io_uring: place ring SQ/CQ arrays under memcg memory limits

Instead of imposing rlimit memlock limits for the rings themselves,
ensure that we account them properly under memcg with __GFP_ACCOUNT.
We retain rlimit memlock for registered buffers, this is just for the
ring arrays themselves.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c