Difference between PM and Disk 13 fig of HDD/SSD) http://storage-system.fujitsu.com/jp/lib-f/tech/beginner/ssd/ load/store to DRAM read/write to SSD/HDD load/store to PM Non-volatile Data Cache Per Sector (4k or 512 bytes) Per Byte (1 byte)
(again) Traditional File Systems ▪ Copy data to page cache in a page granularity ▪ Effective for non byte-addressable, high-latency devices (ex: HDD/SSD) but for PM…? 30 No latency improvements just make a redundant copy! Writes should be cached due to rewrite cycle limitation Caching for PM should be Read through / Write back!
Read through/write back caching scheme 1. OS maps PM as read-only virtual address space 2. DRAM cache is assigned when user writes data 3. The virtual address is remapped to DRAM cache 32 Virtual Address Space DRAM Storage(PM) Write
through/write back caching scheme 1. OS maps PM as read-only virtual address space 2. DRAM cache is assigned when user writes data 3. The virtual address is remapped to DRAM cache 4. fsync persists the data atomically 33 fsync() Virtual Address Space DRAM Storage(PM) CoW!! Write back