Skip to content
Commit ec39f769 authored by Chris Mason's avatar Chris Mason Committed by David Sterba
Browse files

Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios



Async CRCs and compression submit IO through helper threads, which means
they have IO priority inversions when cgroup IO controllers are in use.

This flags all of the writes submitted by btrfs helper threads as
REQ_CGROUP_PUNT.  submit_bio() will punt these to dedicated per-blkcg
work items to avoid the priority inversion.

For the compression code, we take a reference on the wbc's blkg css and
pass it down to the async workers.

For the async CRCs, the bio already has the correct css, we just need to
tell the block layer to use REQ_CGROUP_PUNT.

Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
Modified-and-reviewed-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1d53c9e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment