From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752904AbdEHIhE (ORCPT ); Mon, 8 May 2017 04:37:04 -0400 Received: from bes.se.axis.com ([195.60.68.10]:54851 "EHLO bes.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbdEHIhC (ORCPT ); Mon, 8 May 2017 04:37:02 -0400 Date: Mon, 8 May 2017 10:36:54 +0200 From: Ricard Wanderlof X-X-Sender: ricardw@lnxricardw1 To: David Woodhouse CC: Pavel Machek , Tejun Heo , , , Hans de Goede , , , , Henrique de Moraes Holschuh Subject: Re: Race to power off harming SATA SSDs In-Reply-To: <1494231215.6528.22.camel@infradead.org> Message-ID: References: <20170410232118.GA4816@khazad-dum.debian.net> <20170410235206.GA28603@wtj.duckdns.org> <20170507204007.GA25628@atrey.karlin.mff.cuni.cz> <1494228094.6528.14.camel@infradead.org> <1494231215.6528.22.camel@infradead.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.0.5.60] X-ClientProxiedBy: XBOX02.axis.com (10.0.5.16) To XBOX03.axis.com (10.0.5.17) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 May 2017, David Woodhouse wrote: > > I've got a problem with the underlying mechanism. How long does it take to  > > erase a NAND block? A couple of milliseconds. That means that for an erase  > > to be "weak" du to a power fail, the host CPU must issue an erase command,  > > and then the power to the NAND must drop within those milliseconds.  > > However, in most systems there will be a power monitor which will  > > essentially reset the CPU as soon as the power starts dropping. So in  > > practice, by the time the voltage is too low to successfully supply the  > > NAND chip, the CPU has already been reset, hence, no reset command will  > > have been given by the time NAND runs out of steam. > > > > Sure, with switchmode power supplies, we don't have those large capacitors  > > in the power supply which can keep the power going for a second or more,  > > but still, I would think that the power wouldn't die fast enough for this  > > to be an issue. > > > Our empirical testing trumps your "can never happen" theory :) I'm sure it does. But what is the explanation then? Has anyone analyzed what is going on using an oscilloscope to verify relationship between erase command and supply voltage drop? /Ricard -- Ricard Wolf Wanderlöf ricardw(at)axis.com Axis Communications AB, Lund, Sweden www.axis.com Phone +46 46 272 2016 Fax +46 46 13 61 30