I've updated the TRIM patches to include Sam Greear's comments. Thanks Sam.
The updated code and graph below can be found here:
I also created a graph showing the effect of "random small writes" on
sequential read performance on an SSD. What I did was TRIM the device, then
dirty the device for X minutes, then sequentially read through the entire
device. The graph shows the average read throughput of reading the entire
This implies that if you end up doing a lot of small-write updates and
sequential reads, you should use TRIM...
I'm trying to get numbers while using online UFS trim, but I'm still trying
to debug the "fsstress& UFS" bug (appears on master w/out TRIM too):