On Fri, Jun 8, 2012 at 12:37 PM, Alexander von Gluck <kallisti5@xxxxxxxxxxx> wrote: > > I've made the first steps to getting the path for the ATA trim command to > the drive. [SNIP] > The above patches mean to perform the trim on the disk, calling the scsi > "write same" from the filesystem (or kernel block) layer on discard > somewhere would result in the hardware trim event. > > Thoughts? Given my extremely limited knowledge of the Haiku file system code, this seems like a reasonable approach to us eventually getting trim support for SSDs. In general I say this is very welcome from my side since my current main PC which I want to use for Haiku development has an SSD as its main system drive. I expect we will see SSDs more and more in new computers. On the topic of trim, I've educated myself a bit and it seems using the trim command appropriately and smartly is very important. Doing it for every delete can be expensive and slow down performance. Of course with these patches you are just introducing the ability to call the command, not actually calling it. Unsurprisingly the situation on Linux is not very good, and the current best recommended practice (as far as I can see) is to have a cron job which calls an fstrim (or similar) command periodically, and that sends batched trim commands for deleted files. Lastly on the topic of SSDs, it seems Windows 7 has some of the best support, and it might be useful for us to study that and emulate what makes sense. Here is something good to read on the subject: http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx -- Regards, Ryan