Re: Race to power off harming SATA SSDs

2017-04-11 Thread Henrique de Moraes Holschuh
On Tue, 11 Apr 2017, Martin Steigerwald wrote: > I do have a Crucial M500 and I do have an increase of that counter: > > martin@merkaba:~[…]/Crucial-M500> grep "^174" smartctl-a-201* > smartctl-a-2014-03-05.txt:174 Unexpect_Power_Loss_Ct 0x0032 100 100 > 000 > Old_age Always

Re: Race to power off harming SATA SSDs

2017-04-10 Thread Henrique de Moraes Holschuh
On Mon, 10 Apr 2017, James Bottomley wrote: > On Tue, 2017-04-11 at 08:52 +0900, Tejun Heo wrote: > [...] > > > Any comments? Any clues on how to make the delay "smarter" to > > > trigger only once during platform shutdown, but still trigger per > > > -device when doing per-device hotswapping ? >

Re: Race to power off harming SATA SSDs

2017-04-10 Thread Henrique de Moraes Holschuh
On Tue, 11 Apr 2017, Tejun Heo wrote: > > The kernel then continues the shutdown path while the SSD is still > > preparing itself to be powered off, and it becomes a race. When the > > kernel + firmware wins, platform power is cut before the SSD has > > finished (i.e. the SSD is subject to an uncl

Re: Race to power off harming SATA SSDs

2017-04-10 Thread Henrique de Moraes Holschuh
On Mon, 10 Apr 2017, Bart Van Assche wrote: > On Mon, 2017-04-10 at 20:21 -0300, Henrique de Moraes Holschuh wrote: > > A proof of concept patch is attached > > Thank you for the very detailed write-up. Sorry but no patch was attached > to the e-mail I received from you ...

sd: wait for slow devices on shutdown path

2017-04-10 Thread Henrique de Moraes Holschuh
Author: Henrique de Moraes Holschuh Date: Wed Feb 1 20:42:02 2017 -0200 sd: wait for slow devices on shutdown path Wait 1s during suspend/shutdown for the device to settle after we issue the STOP command. Otherwise we race ATA SSDs to powerdown, possibly causing

Race to power off harming SATA SSDs

2017-04-10 Thread Henrique de Moraes Holschuh
Summary: Linux properly issues the SSD prepare-to-poweroff command to SATA SSDs, but it does not wait for long enough to ensure the SSD has carried it through. This causes a race between the platform power-off path, and the SSD device. When the SSD loses the race, its power is cut while it is st

Re: TRIM/UNMAP/DISCARD via ATA Passthrough

2016-09-13 Thread Henrique de Moraes Holschuh
On Mon, 12 Sep 2016, Jason A. Donenfeld wrote: > I was wondering if it'd be possible to have the uas driver -- or > perhaps somewhere else in the stack -- fall back to using > ATA-passthrough-TRIM for UNMAP, so that discard can work properly. > AFAIK, the Windows drivers do exactly this. > > If th

Re: [patch 3/3] Enable Aggressive Link Power management for AHCI controllers.

2007-06-12 Thread Henrique de Moraes Holschuh
On Tue, 12 Jun 2007, Matthew Garrett wrote: > On Tue, Jun 12, 2007 at 09:18:19AM -0300, Henrique de Moraes Holschuh wrote: > > On Tue, 12 Jun 2007, Matthew Garrett wrote: > > > > > > On laptops, I suspect that we'll probably get an ACPI interrupt even if >

Re: [patch 3/3] Enable Aggressive Link Power management for AHCI controllers.

2007-06-12 Thread Henrique de Moraes Holschuh
On Tue, 12 Jun 2007, Matthew Garrett wrote: > On Mon, Jun 11, 2007 at 08:59:46PM -0700, Arjan van de Ven wrote: > > that's a temporary shortcoming; even with these power savings you can > > do hotplug as long as you're willing to poll for it at a reasonable > > interval and are willing to wait th

Re: [patch 3/3] Enable Aggressive Link Power management for AHCI controllers.

2007-06-11 Thread Henrique de Moraes Holschuh
On Mon, 11 Jun 2007, Jeff Garzik wrote: > >>on/off doesn't really make sense if the question is "do you favor power > >>or do you favor performance"... Actually, it does if you think of it as "do you need hotplug right now or not?". > >How about just making it a numeric scale with 0 meaning n

Re: [patch 3/3] Enable Aggressive Link Power management for AHCI controllers.

2007-06-11 Thread Henrique de Moraes Holschuh
On Mon, 11 Jun 2007, Kristen Carlson Accardi wrote: > Setting Effect > -- > min_power ALPM is enabled, and link set to enter > lowest power state (SLUMBER) when idle > Hot plug not allowed. > > m

Re: [PATCH 2/3] sd: implement START/STOP management

2007-03-22 Thread Henrique de Moraes Holschuh
On Thu, 22 Mar 2007, Vladislav Bolkhovitin wrote: > Seems, there is another way of doing a bank spin up / spin down: doing > it in two passes. On the first pass START_STOP will be issued with > IMMED=1 on all devices, then on the second pass START_STOP will be > issued with IMMED=0. So the devic