]> 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)
commit831ac071defb981e7efef508363762b5a97e65ed
tree89231bbe87d3ef3a5b773c346d3780bbcc1059ec
parent1e872d4fcab525aa41639fc3eb6e9b0cfb012f00
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