]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: stop using btrfs_schedule_bio()
authorChris Mason <clm@fb.com>
Wed, 10 Jul 2019 19:28:14 +0000 (12:28 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:52 +0000 (12:46 +0100)
commit73540b904ed9adb3cd9be045d218d706b2a4a303
treef4f5e77f3f7b40e25720ca7f13e8f285404186bb
parent4013cdab761df99de10b9b0fd1e3c9dbe7444df2
Btrfs: stop using btrfs_schedule_bio()

btrfs_schedule_bio() hands IO off to a helper thread to do the actual
submit_bio() call.  This has been used to make sure async crc and
compression helpers don't get stuck on IO submission.  To maintain good
performance, over time the IO submission threads duplicated some IO
scheduler characteristics such as high and low priority IOs and they
also made some ugly assumptions about request allocation batch sizes.

All of this cost at least one extra context switch during IO submission,
and doesn't fit well with the modern blkmq IO stack.  So, this commit stops
using btrfs_schedule_bio().  We may need to adjust the number of async
helper threads for crcs and compression, but long term it's a better
path.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/disk-io.c
fs/btrfs/inode.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h