There have been attempts to use an SSD as a swap layer to implement SSD-backed
memory. This method degrades write performance and SSD lifetime with many small,
random writes. Similar issues occur when an SSD is simply mmaped.
To minimize the number of small, random writes, fatcache treats the SSD as a
log-structured object store. All writes are aggregated in memory and written to
the end of the circular log in batches - usually multiples of 1 MB.
ptr = mmap(..., len, ..)
/* do stuff with ptr */
Or do I just msync the whole region then hope and pray that the OS will do the right thing?