Enable SSD TRIM

superwofy

Corporal
Jan 18, 2021
134
204
0
Won't go into too much detail on what T.R.I.M. is but the short of it is that when using an SSD you want this enabled.
As it happens fs-qnx6.so actually supports this out of the box but it is not enabled since EVO uses an HDD by design.

devb-ahci-hbomap5 is the driver that controls the CD drive and the HDD ports.

Code:
CD arguments: ahci ioport=0x5E406000,irq=516,xlat=0x30000000,bs=speed_limit=0,bs=cmd_abort=none blk cache=1m,vnode=256,delwri=2,marking=none,noatime,memory=/ram/dma udf verify=none cam resmgr,verbose=1 cdrom timeout=30:30:30:30,retries=3 mem name=/ram/dma

HDD arguments: ahci ioport=0x4a140000,irq=86,bs=speed_limit=0 blk cache=32M,vnode=256,delwri=2,marking=none,noatime,verbose=bf cam cache,async,timeout=35:35:35:35,verbose=1,retries=3


To enable TRIM for the HDD port simply add an option to the qnx6 driver in the arguments list: qnx6 trim=enable.
I.e. the new HDD arguments would be:

Code:
ahci ioport=0x4a140000,irq=86,bs=speed_limit=0 blk cache=32M,vnode=256,delwri=2,marking=none,noatime,verbose=bf cam cache,async,timeout=35:35:35:35,verbose=1,retries=3 qnx6 trim=enable


Bootlog before:
Code:
hu-omap:/dev/shmem> sloginfo | grep trim
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda0 trim not enabled
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda1 trim not enabled
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda31 trim not enabled
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda32 trim not enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/data trim not enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/share trim not enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/quota/mm trim not enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/quota/sys trim not enabled



Bootlog after:
Code:
hu-omap:/dev/shmem> sloginfo | grep trim
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda0 trim not enabled
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda1 trim not enabled
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda31 trim not enabled
Jan 01 00:00:00    5     3   1000 fs-qnx6: /fs/sda32 trim not enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/data trim enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/share trim enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/quota/mm trim enabled
Jan 01 00:00:01    5     3   1000 fs-qnx6: /mnt/quota/sys trim enabled



To make this change edit /opt/sys/etc/starter.cfg
 
  • Agree
Reactions: zomboi09