]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/ata/ahci.c
ahci: Allow setting a default LPM policy for mobile chipsets
authorHans de Goede <hdegoede@redhat.com>
Wed, 28 Nov 2018 09:19:00 +0000 (10:19 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit023e1cc7bbad4f600cd90f268a94a873be79dca2
treea1e4f645b5dd718716725bf398cefc7cc954895a
parentd858733684881179484abe2cfd00b10ab6e9455e
ahci: Allow setting a default LPM policy for mobile chipsets

BugLink: https://bugs.launchpad.net/bugs/1781533
On many laptops setting a different LPM policy then unknown /
max_performance can lead to power-savings of 1.0 - 1.5 Watts (when idle).

Modern ultrabooks idle around 6W (at 50% screen brightness), 1.0 - 1.5W
is a significant chunk of this.

There are some performance / latency costs to enabling LPM by default,
so it is desirable to make it possible to set a different LPM policy
for mobile / laptop variants of chipsets / "South Bridges" vs their
desktop / server counterparts. Also enabling LPM by default is not
entirely without risk of regressions. At least min_power is known to
cause issues with some disks, including some reports of data corruption.

This commits adds a new ahci.mobile_lpm_policy kernel cmdline option,
which defaults to a new SATA_MOBILE_LPM_POLICY Kconfig option so that
Linux distributions can choose to set a LPM policy for mobile chipsets
by default.

The reason to have both a kernel cmdline option and a Kconfig default
value for it, is to allow easy overriding of the default to allow
trouble-shooting without needing to rebuild the kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
(backported from commit ebb82e3c79d2a956366d0848304a53648bd6350b)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Aaron Ma <aaron.ma@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/ata/Kconfig
drivers/ata/ahci.c
drivers/ata/ahci.h