5 ms·
In Apple's defense, they probably have enough power even in the worst case to limp along enough to flush in laptop form factor, even if the power management com
by monocasa 5y ago
In Apple's defense, they probably have enough power even in the worst case to limp along enough to flush in laptop form factor, even if the power management components refuse to power the main CCXs. Speccing out enough caps in the desktop case would be very Apple as well.
- marcan_42 5y agoApple do not have PLP on their desktop machines (at least not the Mac Mini). I've tested over 5 seconds of written but not FLUSHed data loss, and confirmed via hypervisor tracing that macOS doesn't do anything when you yank power. It just dies.
- monocasa 5y agoWith truly no PLP I'd expect unrecovarable drives that have screwed up their FTL when you pull power.
- marcan_42 5y agoYou can design your FTL to be resilient to arbitrary power loss, as long as the NAND chips don't physically go off corrupting unrelated data on power down. That only requires extremely minimal capacitance. I believe Apple SSDs do have some of that in the NAND PMIC next to the storage chips themselves; it probably knows to detect falling voltage rails and trigger a stop of all writes to avoid any actual corruption due to out-of-spec voltages.
- monocasa 5y agoI've absolutely heard storage vendors talking about protecting just the FTL during power loss as PLP. You could have an FTL where any writes are atomic, but that gets in the way of throughput practically. The storage vendors don't seem to generally be on board that tradeoff except for 'industrial' branded SKUs that also make throughput tradeoffs anyway.
- marcan_42 5y agoThat's not necessarily true, it just comes down to the design. Apple seem to use a log-structured FTL which works great for performance and just requires a (very fast) log replay after a hard shutdown. You can see the syslog messages from the NVMe controller (via RTKit) talking about rebuilding the table when this happens. Micron also talks about power loss resistant FTL design in their whitepaper, and although their older SSDs had caps, I think their recent ones mostly do away entirely. https://www.micron.com/-/media/client/global/documents/products/white-paper/ssd_power_loss_protection_white_paper_lo.pdf https://www.micron.com/-/media/client/global/documents/produ... This kind of stuff has been done in filesystems for ages (journaling etc.); there's no reason why FTLs can't be designed the same way.
- monocasa 5y agoThe micron whitepaper you cited talks about how their higher tier strategy involves keeping enough capacitance around to write out the FTL, because it's DRAM copy is allowed to get out of sync when the write-cache is enabled. > The hold-up circuitry also preserves enough time and energy to ensure that the FTL addressing table is properly saved to the NAND. This thorough amount of data protection not only ensures data integrity in unexpected power-loss events, but it also enables the system designer to leave the SSD’s write cache enabled, giving a significant advantage in data throughput speeds.
- withinboredom 5y agoOnce voltage from the battery gets too low (despite reporting whatever % charge), you aren't getting anything from the battery.
- monocasa 5y agoIt's the other way around. The PMIC cuts the main system off at a certain voltage, and even in the worse case you have the extra watt/sec to flush everything at that point.
- withinboredom 5y agoI'm really hoping the battery has a low-voltage cutoff... I guess the question is: does the battery cut the power, or does the laptop? In the latter case, this may be "ok" for some definition of ok. The former, there's probably not enough juice to do anything.
- monocasa 5y ago> does the battery cut the power, or does the laptop? Last time I checked (and I could very well be out of date on this), there wasn't really a difference. It wasn't like an 18650 were the cells themselves have protection, but a cohesive power management subsystem that managed the cells more or less directly. It had all the information to correctly make such choices (but, you know, could always have bugs, or it's a metric that was never a priority, etc.).
- mardifoufs 5y agoBatteries can technically be used until their voltage is 0 ( it would be hard to get any current under >1 volt for lithium cells but still). The cutoff is either due to the BMS (battery management system) cutting off power to protect the cells from permanent damage or because the voltage is just too low to power the device (but in that case there's still voltage). Running lithium cells under 2.7v leads to permanent damage. But, I'm sure laptops have a built-in safety margin and can cut off power to the system selectively. That's why you can still usually see some electronics powered (red battery light, flashing low battery on a screen, etc) even after you "run out" of battery. I've never designed a laptop battery pack, but from my experience in battery packs in general, you always try to keep safety/sensing/logging electronics powered even after a low voltage cutoff. Even in very cheap commodity packs that are device agnostic, the basic internal electronics of the battery itself always keep themselves powered even after cutting off any power output. Laptops have the advantage of a purpose built battery and BMS so they can have a very fine grained power management even at low voltages.
- b112 5y agoThere is no defense for lying about sync like this. Ever.