News for hackers. Stuff that matters.
Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by nine_k on Tuesday April 24, 2018 @02:13PM (#16915091)
I really wonder why a $10 capacitor add-on (a capacitor, a diode, two connectors) plugged in between main board power supply and a disk power receptacle is not a common item.

Or maybe it is, but I have no idea?

Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by marshray on Tuesday April 24, 2018 @02:33PM (#16915297)
A common minimum voltage requirement for the nominal +5V supply is 4.5 V. Let's assume a voltage below that won't damage the drive, but it won't operate.

The diode is going to drop 0.6V, leaving you with only 4.4 V max for the drive. Then the capacitor is going to immediately start dropping in voltage as soon as you start pulling the stored energy out of it.

So, in practice, to do a quality job of this it will probably need a DC-DC converter. These aren't necessarily expensive, but definitely more complicated than the old diode trick.

Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by nine_k on Tuesday April 24, 2018 @02:45PM (#16915433)
This makes sense! OTOH low-drop diodes do exist [1], and the drive likely needs just a (small) fraction of a second to flush the caches; it's SSD, not need to wait for the disk to rotate to the right position or move heads. I suppose the power loss signal from the controller still propagates, even if the computer's PSU plug is just yanked out of socket.

[1]: https://electronics.stackexchange.com/a/282471/9909

Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by londons_explore on Wednesday April 25, 2018 @08:54AM (#16921050)
The caches on some SSD's can be multiple gigabytes.

They also frequently cache data which can be difficult (slow) to write, for example a single modified 4kb page which is part of a large unmodified area. Completing that write would involve reading the original data, erasing the entire erase-block, and rewriting the new data.

SSD's with built in power loss prevention typically reserve an area on the SSD which is pre-erased ready to dump the contents of the cache into. Then on powerup, they reload the cache and properly flush the data to the actual place it's supposed to be.

Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by jotux on Tuesday April 24, 2018 @02:49PM (#16915467)
I implemented a power-loss circuit on a custom USB memory device (battery-backed LPDDR disks) and used something similar: the MAX40200[1].

[1]https://www.maximintegrated.com/en/products/analog/amplifier...

Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by jotux on Tuesday April 24, 2018 @02:45PM (#16915435)
You also need to limit in-rush current without dropping that voltage and account for capacitor degradation over the life of the device.
Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by pkaye on Tuesday April 24, 2018 @02:39PM (#16915373)
I worked on SSD power loss implementation in the past. You also need a signal into the controller indicating power failed. At this point the controller will minimally stop all less critical tasks, prioritize the buffered user data to be written and make sure the FFS is in consistent state for recovery.
Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by 21 on Tuesday April 24, 2018 @03:17PM (#16915688)
Desktop power supplies already have that, they can keep the power on for 50-100 ms or so, and they do notify the OS about the imminent power loss. I'm not sure what OSes do with that.
Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by gsich on Tuesday April 24, 2018 @03:40PM (#16915885)
How do they notify?
Re:Samsung's 970 EVO SSDs Reviewed – 500GB and 1TB by londons_explore on Wednesday April 25, 2018 @08:57AM (#16921082)
ATX power supplies have a PWR_OK pin, which goes low when power is lost.

Most motherboards don't report that to the OS though, instead they simply reset all the hardware.

To be fair, it's probably preferable to reset stuff than to operate when the power supply isn't healthy, since that will lead to a lot of weird undefined behaviour.