On Thursday, 30 January 2014 22:54:33 UTC, Ray Packham wrote: … I think the software is built into the SSD already … >
Also – of possible interest to Sam and others with a technical mind – please note that there's support for TRIM within the operating system. >From HFS-related source code for the kernel /* ;________________________________________________________________________________ ; ; Routine: hfs_unmap_free_extent ; ; Function: Make note of a range of allocation blocks that should be ; unmapped (trimmed). That is, the given range of blocks no ; longer have useful content, and the device can unmap the ; previous contents. For example, a solid state disk may reuse ; the underlying storage for other blocks. ; ; This routine is only supported for journaled volumes. The extent ; being freed is passed to the journal code, and the extent will ; be unmapped after the current transaction is written to disk. ; ; Input Arguments: ; hfsmp - The volume containing the allocation blocks. ; startingBlock - The first allocation block of the extent being freed. ; numBlocks - The number of allocation blocks of the extent being freed. ;________________________________________________________________________________ */ First appearance in Apple open source: http://www.opensource.apple.com/source/xnu/xnu-2050.9.2/bsd/hfs/hfscommon/Misc/VolumeAllocation.c (Mac OS X 10.8.1) Most recent appearance: http://www.opensource.apple.com/source/xnu/xnu-2422.1.72/bsd/hfs/hfscommon/Misc/VolumeAllocation.c Also, from the latter: /* * Validation Routine to verify that the TRIM list maintained by the journal * is in good shape relative to what we think the bitmap should have. We should * never encounter allocated blocks in the TRIM list, so if we ever encounter them, * we panic. */ … /* ;________________________________________________________________________________ ; ; Routine: hfs_track_unmap_blocks ; ; Function: Make note of a range of allocation blocks that should be ; unmapped (trimmed). That is, the given range of blocks no ; longer have useful content, and the device can unmap the ; previous contents. For example, a solid state disk may reuse ; the underlying storage for other blocks. ; ; This routine is only supported for journaled volumes. ; ; *****NOTE*****: ; This function should *NOT* be used when the volume is fully ; mounted. This function is intended to support a bitmap iteration ; at mount time to fully inform the SSD driver of the state of all blocks ; at mount time, and assumes that there is no allocation/deallocation ; interference during its iteration., ; ; Input Arguments: ; hfsmp - The volume containing the allocation blocks. ; offset - The first allocation block of the extent being freed. ; numBlocks - The number of allocation blocks of the extent being freed. ; list - The list of currently tracked trim ranges. ;________________________________________________________________________________ */ … and so on. *Side note* I stumbled across the relevant source code whilst seeking information about messages that are sent by the kernel in some situations. Within those messages, the following string: kernel[0]: hfs_unmap_free_ext: ignoring trim vol= -- You received this message because you are subscribed to the Google Groups "Sussex Mac User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. Visit this group at http://groups.google.com/group/smug. For more options, visit https://groups.google.com/groups/opt_out.
