Comment by ladyanita22
4 years ago
Then I misunderstood. Do you mean that Apple doesn't implement ANY timeout? So they only flush when the cache is full or when a shutdown routine has started?
4 years ago
Then I misunderstood. Do you mean that Apple doesn't implement ANY timeout? So they only flush when the cache is full or when a shutdown routine has started?
They flush the cache when something requests the cache be flushed; I don't know if there is a timeout, because presumably it's not difficult for some random process to issue a FULLFSYNC and flush everything prior as a side-effect (the flush is global). But I've seen at least 5-10 seconds of data loss from drive cache loss on the Mac Mini, so if they do do deferred flushes the timeout is longer than that.
WTF, that is worse than I thought then. That's the dirtiest hack I've read, it's of very low quality for a company like Apple. That I'd expect for a OnePlus device, not for a full fledged Macbook.
When do off-the-shelf NVMe controllers flush their internal DRAM buffer? I presume that happened after a timeout, even if the OS does not issue a NVMe flush command.
Does Apple implement the NVMe spec on their controller, i.e. do they indicate "Volatile Write Cache"?