public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: tj@kernel.org, stable@vger.kernel.org, stable-commits@vger.kernel.org
Subject: Re: Patch "ahci: Allow setting a default LPM policy for mobile chipsets" has been added to the 4.14-stable tree
Date: Wed, 14 Feb 2018 17:45:33 +0100	[thread overview]
Message-ID: <fb966bc7-465e-7446-0e98-98f5f1e04cea@redhat.com> (raw)
In-Reply-To: <20180214154857.GA3314@kroah.com>

Hi,

On 14-02-18 16:48, Greg KH wrote:
> On Wed, Feb 14, 2018 at 04:03:17PM +0100, Hans de Goede wrote:
>> Hi All,
>>
>> On 14-02-18 15:25, gregkh@linuxfoundation.org wrote:
>>>
>>> This is a note to let you know that I've just added the patch titled
>>>
>>>       ahci: Allow setting a default LPM policy for mobile chipsets
>>>
>>> to the 4.14-stable tree which can be found at:
>>>       http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>>>
>>> The filename of the patch is:
>>>        ahci-allow-setting-a-default-lpm-policy-for-mobile-chipsets.patch
>>> and it can be found in the queue-4.14 subdirectory.
>>>
>>> If you, or anyone else, feels it should not be added to the stable tree,
>>> please let <stable@vger.kernel.org> know about it.
>>
>> I wonder how this ended up on the patches-for-stable list? Torvald's
>> master commits have neither a Cc: stable or a Fixes tag.
>>
>> By itself this series is harmless, until someone actually sets
>> the new Kconfig option to something other then 0.
> 
> See my response to the 4.15.y patch for "how" this came to be merged.
> 
>>> +config SATA_MOBILE_LPM_POLICY
>>> +	int "Default SATA Link Power Management policy for mobile chipsets"
>>> +	range 0 4
>>> +	default 0
>>> +	depends on SATA_AHCI
>>> +	help
>>> +	  Select the Default SATA Link Power Management (LPM) policy to use
>>> +	  for mobile / laptop variants of chipsets / "South Bridges".
>>> +
>>> +	  The value set has the following meanings:
>>> +		0 => Keep firmware settings
>>> +		1 => Maximum performance
>>> +		2 => Medium power
>>> +		3 => Medium power with Device Initiated PM enabled
>>> +		4 => Minimum power
>>> +
>>> +	  Note "Minimum power" is known to cause issues, including disk
>>> +	  corruption, with some disks and should not be used.
>>> +
>>
>> AFAIK 4.14 and older do not have med_power_with_dipm, so setting this
>> to 3 will lead to a setting of min_power. Which leads me to my worry
>> about this series, as said in itself it is harmless, but as the help
>> text says setting it to 4 (*) is dangerous. Actually this week I've
>> received my first bug report that even med_power_with_dipm is causing
>> issues (disconnects) with some devices. I'm working with the reporter
>> an a blacklist entry for the specific SSD in question, but given that
>> we're still figuring this out for master I wonder how wise it is to
>> add these to stable, esp. since stable lacks med_power_with_dipm.
>>
>> At a minimum we should fixup the help-text for 4.14 and older
>> (4.15 does have med_power_with_dipm).
> 
> What would the text be for 4.14.y and older?

Drop the:
		3 => Medium power with Device Initiated PM enabled

Line and:
		4 => Minimum power
Becomes:
		3 => Minimum power

Also "range 0 4" should become "range 0 3"

> I'll be glad to fix that
> up.  Or I can drop the whole thing and fit in the device id update "by
> hand", if you think this shouldn't go to the stable trees.

I would prefer for this to not go to the stable trees. The problem is
that if people enable this and set it to "Minimum power" combined
with say a Crucial_CT525MX300 SSD then this is know to cause data-
corruption, which is not just a regression but one of the worst
kind of regressions. Note people can already get the same result
(shoot themselves in the foot) by using powertop --auto-tune,
or TLP, or setting this manually through sysfs. I really wonder
if the stable series is a good place to give people one more
way to shoot themselves in the foot though and I'm worried that
some distro kernel maintainer will see this new option in a stable
update and sets it to Minimum power, which would be quite bad.

As said before I've just received my first bug-report of this
causing issues even with the more conservative "med_power_with_dipm"
option, which is known to e.g. not cause issues on that same
Crucial_CT525MX300 SSD. So I will likely be submitting some
ATA_HORKAGE_NOLPM quirk patches to tj soon. TL;DR: I really
believe this is too adventurous for the stable kernels.

Regards,

Hans

  reply	other threads:[~2018-02-14 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 14:25 Patch "ahci: Allow setting a default LPM policy for mobile chipsets" has been added to the 4.14-stable tree gregkh
2018-02-14 15:03 ` Hans de Goede
2018-02-14 15:48   ` Greg KH
2018-02-14 16:45     ` Hans de Goede [this message]
2018-02-14 18:23       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb966bc7-465e-7446-0e98-98f5f1e04cea@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox