
Btrfs has been handling its DISCARD functionality synchronously during the transaction commit, but that can lead to performance issues depending upon the amount of TRIM'ing required and how the drive behaves. With this async discard support, the work is punted off the transaction commit.
By doing the SSD DISCARD work asynchronously, Facebook found on their Btrfs servers that the discarding is done more efficiently and read latencies were reduced.
This async discard implementation for Btrfs was queued into the for-next branch ahead of the upcoming Linux 5.6 merge window. So unless any nasty issues come about, this should be yet another feature of the quite frankly super-feature-packed Linux 5.6 kernel.
More details on the Btrfs async discard code can be found via this code comment.
4 Comments
