Re: [RFC PATCH 1/1] block: charge passthrough requests to the submitter's cgroup

From: Tejun Heo

Date: Tue Sep 22 2026 - 14:18:11 EST


Hello,

On Tue, Sep 22, 2026 at 04:09:57PM +0800, Tao Cui wrote:
> I don't have a specific passthrough workload that triggered this in
> production. I ran into it while testing blk-iocost accounting coverage.
>
> The relevant concern here is cgroup IO isolation. The expectation of
> blkcg IO control is that the IO consumed by a cgroup is reflected in its
> accounting and subject to blkcg IO policies. Today that is true for IO
> going through submit_bio(), but not for passthrough requests.
>
> The concrete observation was that the same cgroup issuing equivalent
> writes through two paths gets different results: normal bio IO is
> accounted in io.stat and subject to blkcg IO policies, while SG_IO
> writes consume device bandwidth without accounting or blkcg IO control.
>
> So the motivation is not a particular SG_IO application, but whether
> passthrough IO should be considered part of the IO usage controlled by
> blkcg.
>
> I don't know yet whether the right answer is always-on behavior or an
> opt-in mechanism. The RFC was mainly to discuss whether passthrough
> paths should be covered by blkcg accounting/enforcement at all.

SG_IO requires CAP_RAW_IO, so any kind of isolation isn't gonna work out
that well. This is an imaginary use case. Please stop until it become an
actual one.

Thanks.

--
tejun