Re: [PATCHSET for-5.3/block] block: add blkcg bio punt mechanism

Jens Axboe
2019-07-10T13:53:26Z

On 6/27/19 2:39 PM, Tejun Heo wrote:
> Hello,
>
> This patchset contains only the block part of the following
>
> [1] [PATCHSET v2 btrfs/for-next] blkcg, btrfs: fix cgroup writeback support
>
> with the following changes
>
> * wbc_account_io() is renamed to wbc_account_cgroup_owner() and
> wbc->no_account_io to wbc->no_cgroup_owner for clarity.
>
> When writeback is executed asynchronously (e.g. for compression), bios
> are bounced to and issued by worker pool shared by all cgroups. This
> leads to significant priority inversions when cgroup IO control is in
> use - IOs for a low priority cgroup can tie down the workers forcing
> higher priority IOs to wait behind them.
>
> This patchset adds an bio punt mechanism to blkcg and updates btrfs to
> issue async IOs through it. A bio tagged with REQ_CGROUP_PUNT flag is
> bounced to the asynchronous issue context of the associated blkcg on
> bio_submit(). As the bios are issued from per-blkcg work items,
> there's no concern for priority inversions and it doesn't require
> invasive changes to the filesystems. The mechanism should be
> generally useful for IO control support across different filesystems.

Applied for 5.3, thanks Tejun.

--
Jens Axboe