]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: add blkcg accounting to offloaded operations
authorDennis Zhou <dennis@kernel.org>
Wed, 16 Sep 2020 20:41:05 +0000 (13:41 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:34 +0000 (20:32 -0600)
commitd51ce2c5f0c8f16a24a365c4d5cbe35510d13a20
tree89231bbe87d3ef3a5b773c346d3780bbcc1059ec
parentb99034d3cf55a8d02e64c52d35a3b46921aef04b
io_uring: add blkcg accounting to offloaded operations

There are a few operations that are offloaded to the worker threads. In
this case, we lose process context and end up in kthread context. This
results in ios to be not accounted to the issuing cgroup and
consequently end up as issued by root. Just like others, adopt the
personality of the blkcg too when issuing via the workqueues.

For the SQPOLL thread, it will live and attach in the inited cgroup's
context.

Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io-wq.c
fs/io-wq.h
fs/io_uring.c