• Dennis Zhou's avatar
    io_uring: add blkcg accounting to offloaded operations · 91d8f519
    Dennis Zhou authored
    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: default avatarDennis Zhou <dennis@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    91d8f519
io-wq.c 28.4 KB