Linux has maintained a default 4MB minimum writeback chunk size but with the in-development Linux 6.19 kernel it will allow file-systems to override that minimum value. This in turn can help avoid fragmentation and yield a better experience for zoned rotation media and other uses.
Merged yesterday alongside other pull requests submitted by Microsoft engineer Christian Brauner was the feature of allowing file-systems to increase the minimum writeback chunk size. Brauner explained in the merged pull request:
“Allow file systems to increase the minimum writeback chunk size. The relatively low minimal writeback size of 4MiB means that written back inodes on rotational media are switched a lot. Besides introducing additional seeks, this also can lead to extreme file fragmentation on zoned devices when a lot of files are cached relative to the available writeback bandwidth. This adds a superblock field that allows the file system to override the default size, and sets it to the zone size for zoned XFS.”
The writeback code for Linux 6.19 also now allows logging of slow writeback when it exceeds a sysctl set hung task timeout threshold. The goal is to help identify tasks waiting for a long time and narrowing down potential issues.
More details on these writeback changes for Linux 6.19 via this pull.
