UFS File-Based Optimization Patches For Linux: Shot Down As "Complete & Utter Madness"

Written by Michael Larabel in Linux Storage on 2 November 2022 at 05:20 AM EDT. Add A Comment
LINUX STORAGE --
JEDEC recently outlined an extension to Universal Flash Storage (UFS) for File-Based Optimizations (FBO) to enhance the performance of UFS devices. A Xiaomi engineer sent out a set of Linux kernel patches for implementing UFS FBO in the name of better performance, but with almost immediate rejection by a veteran Linux kernel maintainer.

JEDEC published the UFS FBO extension specification in August. UFS FBO aims to deal with device performance potentially deteriorating over time via physical defragmentation of LBA ranges that are associated with specific files. The FBO spec is outlined on JEDEC.org.

Sent out today were a set of patches implementing UFS File-Based Optimizations where it was summed up with the new host requirements for the feature:
This feature expects the following host-device dialog:
1) The host let the device know of lba range(s) of interest. Those ranges are typically associated with a specific file. One can obtain it from the iNode of the file and some offset calculations.
2) The host ask the device for the current physical fragmentation level of this file.
3) Should it requires, the host instruct the device to perform defragmentation.
4) Upon successful termination of the defragmentation phase, the host may ask for the new fragmentation level of the file.

But the notion of the host system needing to let the device know of specific LBA ranges for files may prove ill-conceived. Longtime Linux kernel developer -- and maintainer of multiple areas of the kernel -- Christoph Hellwig almost immediately commented:
This is completely and utter madness. Files are a logic concept, that is non-unique (reflinks, snapshot) and can change at any time (defragmentation, GC, dedup). Whoever came up with this scheme is on crack and the it has no business being in the Linux kernel

NAK.

So as it stands now these four UFS Linux patches for the File-Based Optimization support may have a tough time getting mainlined.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week