aboutsummaryrefslogtreecommitdiff
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorJens Axboe2020-09-17 16:19:16 -0600
committerJens Axboe2020-09-30 20:32:34 -0600
commitde2939388be564836b06f0f06b3787bdedaed822 (patch)
tree78967b16e25e004b56b547a1705dd3c4571428bd /fs/io-wq.c
parent14db84110d489276d9c06ea38d59d3ff0ade2ae1 (diff)
io_uring: improve registered buffer accounting for huge pages
io_uring does account any registered buffer as pinned/locked memory, and checks limit and fails if the given user doesn't have a big enough limit to register the ranges specified. However, if huge pages are used, we are potentially under-accounting the memory in terms of what gets pinned on the vm side. This patch rectifies that, by ensuring that we account the full size of a compound page, regardless of how much of it is being registered. Huge pages are not accounted mulitple times - if multiple sections of a huge page is registered, then the page is only accounted once. Reported-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
0 files changed, 0 insertions, 0 deletions