Btrfs Receives A Very Important Last Minute Fix For Linux 6.3
Ahead of the Linux 6.3 kernel being potentially released as stable on Sunday, two last minute patches for the Btrfs file-system driver were submitted today to address a pressing problem since Linux 6.2.
Btrfs for Linux 6.3 is seeing last minute work to fix problems with async discard, which has been enabled by default since Linux 6.2. The default async discard behavior had a low IOPS limit and processing a large batch of discards would take a long time and waste power / disk activity.
Boris Burkov sent out the Btrfs patches earlier this month and explained:
The Btrfs change should land shortly in Linux 6.3 Git and presumably picked up by Linux 6.2 as a stable fix too.
Btrfs for Linux 6.3 is seeing last minute work to fix problems with async discard, which has been enabled by default since Linux 6.2. The default async discard behavior had a low IOPS limit and processing a large batch of discards would take a long time and waste power / disk activity.
Boris Burkov sent out the Btrfs patches earlier this month and explained:
"Since discard=async became the implicit default in btrfs in the 6.2 kernel, there have been numerous complaints about discard being too spread out on workstation systems. This results in situations like a users drive not being idle for an unexpectedly long period of time.
This is caused by a relatively low default iops limit of 10, so this series raises the default limit to 1000 (1ms delay) and modifies a weird fallback behavior for limit=0 to be interpreted as unlimited.
...
Previously, the default was a relatively conservative 10. This results in a 100ms delay, so with ~300 discards in a commit, it takes the full 30s till the next commit to finish the discards. On a workstation, this results in the disk never going idle, wasting power/battery, etc.
Set the default to 1000, which results in using the smallest possible delay, currently, which is 1ms. This has shown to not pathologically keep the disk busy by the original reporter."
The Btrfs change should land shortly in Linux 6.3 Git and presumably picked up by Linux 6.2 as a stable fix too.
42 Comments