On Fri, Dec 20, 2019 at 2:24 AM Lennart Poettering <mzerqung@xxxxxxxxxxx> wrote: > > On Do, 19.12.19 16:42, Ben Cotton (bcotton@xxxxxxxxxx) wrote: > > > Over time, some users experience slow downs in certain flash storage > > devices. This might be alleviated by issuing a periodic fstrim command > > to the mounted file system. Devices and file systems that don't > > support fstrim are unaffected. > > So, if this is desirable, why doesn't the kernel do this on its own? The simple answer is, because we're only just now coming out of the stone age, and into the bronze age, of SSDs. There were too many significant differences in early SSD behavior across makes/models. The way that's been handled across platforms (Linux, macOS, Windows, BSD) differs too, reflecting that the standards weren't specific enough, ample vendor confusion and firmware bugs, etc. Today the supply of SSDs is very heterogeneous, and they inadequately announce their capabilities and preferences in this regard. > Why do we need a userspace component that just gets an event from the > kernel and then tells the kernel to do something? If this is generally > desirable, why is something as trivial as that not a kernel > functionality anyway? Issuing the command once per week harms no one, and benefits a few who happen to have devices that will perform better with this scheduled hint than without it. It's the most universally applicable way of doing it, however subjective. And as mentioned in the proposal, other distributions have had this same unit enabled for many years. It's reasonable to enable fstrim.timer now. *And* conduct parallel development to create a kernel facility to do this automatically, if it's even possible. I'm not convinced the drives report enough information to do this properly automatically, rather than on a schedule. But saying this belongs in the kernel, indeterminate future, while other distributions have been doing this on a schedule upwards of six years, and is supported on Windows and macOS for about that long too? *shrug* I'm not sure that makes sense. And to be true, Windows and macOS have used their own white listing method to do this, meaning quite a lot of devices aren't getting these hints and are left out. -- Chris Murphy _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx