Skip to contentSkip to conversation

ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm

PATCH Applied Niklas Cassel 2 participants 6 messages May 2, 2024 – May 27, 2024 libata

lore
Share & tools
lore

Niklas Cassel

author maintainer
#0 lore raw

PATCH 1/1 ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm

From: Mario Limonciello <[email protected]>

Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well.

Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata:
ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included).

[cassel: rebased and reworded commit message]
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +1 -1
index b595494ab9b4..e00536b49552 100644
@@ -118,7 +118,7 @@ config SATA_AHCI
 config SATA_MOBILE_LPM_POLICY
 	int "Default SATA Link Power Management policy"
 	range 0 4
-	default 0
+	default 3
 	depends on SATA_AHCI
 	help
 	  Select the Default SATA Link Power Management (LPM) policy to use
Signature · 1 line
2.44.0
maintainer
#1 lore raw
Quoted 28 lines · Niklas Cassel

From: Mario Limonciello <[email protected]>

Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well.

Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata:
ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included).

[cassel: rebased and reworded commit message]
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +0 -0
index b595494ab9b4..e00536b49552 100644

drivers/ata/Kconfig config SATA_AHCI · line 124

Quoted 8 lines
drivers/ata/Kconfig +1 -1
@@ -118,7 +118,7 @@ config SATA_AHCI
 config SATA_MOBILE_LPM_POLICY
 	int "Default SATA Link Power Management policy"
 	range 0 4
-	default 0
+	default 3
 	depends on SATA_AHCI
 	help
 	  Select the Default SATA Link Power Management (LPM) policy to use

I am OK with this change. However, for this one, given that we already are at mid-rc6, I really would prefer waiting for next cycle to have this spend more time in for-next testing. So let's apply this once 6.10-rc1 is out.

Signature · 2 lines
Damien Le Moal
Western Digital Research
author maintainer
#2 lore raw
Quoted 33 lines · Damien Le Moal
Quoted 32 lines · Niklas Cassel

From: Mario Limonciello <[email protected]>

Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well.

Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata:
ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included).

[cassel: rebased and reworded commit message]
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +0 -1
index b595494ab9b4..e00536b49552 100644
@@ -118,7 +118,7 @@ config SATA_AHCI
 config SATA_MOBILE_LPM_POLICY
 	int "Default SATA Link Power Management policy"
 	range 0 4
-	default 0
Quoted 8 lines

drivers/ata/Kconfig config SATA_AHCI · line 124

Quoted 4 lines
drivers/ata/Kconfig +1 -0
+	default 3
 	depends on SATA_AHCI
 	help
 	  Select the Default SATA Link Power Management (LPM) policy to use

I am OK with this change. However, for this one, given that we already are at mid-rc6, I really would prefer waiting for next cycle to have this spend more time in for-next testing. So let's apply this once 6.10-rc1 is out.

Sounds good to me.

Kind regards,
Niklas

author maintainer
#3 lore raw
In reply to Damien Le Moal
Quoted 33 lines · Damien Le Moal
Quoted 32 lines · Niklas Cassel

From: Mario Limonciello <[email protected]>

Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well.

Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata:
ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included).

[cassel: rebased and reworded commit message]
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +0 -1
index b595494ab9b4..e00536b49552 100644
@@ -118,7 +118,7 @@ config SATA_AHCI
 config SATA_MOBILE_LPM_POLICY
 	int "Default SATA Link Power Management policy"
 	range 0 4
-	default 0
Quoted 8 lines

drivers/ata/Kconfig config SATA_AHCI · line 124

Quoted 4 lines
drivers/ata/Kconfig +1 -0
+	default 3
 	depends on SATA_AHCI
 	help
 	  Select the Default SATA Link Power Management (LPM) policy to use

I am OK with this change. However, for this one, given that we already are at mid-rc6, I really would prefer waiting for next cycle to have this spend more time in for-next testing. So let's apply this once 6.10-rc1 is out.

Could you please give an explicit Acked-by / Reviewed-by ?

Kind regards,
Niklas

maintainer Reviewed-by on v1 1/1
#4 lore raw
In reply to Niklas Cassel
Quoted 16 lines · Niklas Cassel

From: Mario Limonciello <[email protected]>

Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well.

Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata:
ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included).

Quoted 3 lines
[cassel: rebased and reworded commit message]

All distributions use this, so doing the same will potentially allow us to catch buggy hardware earlier while in linux-next testing phase. So yes.

Quoted 17 lines
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +1 -1
index b595494ab9b4..e00536b49552 100644
@@ -118,7 +118,7 @@ config SATA_AHCI
 config SATA_MOBILE_LPM_POLICY
 	int "Default SATA Link Power Management policy"
 	range 0 4
-	default 0
+	default 3
 	depends on SATA_AHCI
 	help
 	  Select the Default SATA Link Power Management (LPM) policy to use
Signature · 2 lines
Damien Le Moal
Western Digital Research
author maintainer Applied
#5 lore raw
In reply to Niklas Cassel
Quoted 39 lines · Niklas Cassel

From: Mario Limonciello <[email protected]>

Historically this was set to "keep_firmware_settings" to prevent problems with power management on very old drives. However it's been observed that almost all modern Linux distributions either set the policy to "med_power_with_dipm" in the kernel configuration or update it to this via userspace policy changes. Update the policy default in the kernel to "med_power_with_dipm" to match that behavior as well.

Changing the default was previously not a good idea, because LPM disables detection of hot plug removals, however, since commit ae1f3db006b7 ("ata:
ahci: do not enable LPM on external ports"), a port marked as external will always be initialized to "keep_firmware_settings", regardless of the SATA_MOBILE_LPM_POLICY Kconfig value. Therefore, changing the default is now considered safe (external ports included).

[cassel: rebased and reworded commit message]
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +1 -1
index b595494ab9b4..e00536b49552 100644
@@ -118,7 +118,7 @@ config SATA_AHCI
 config SATA_MOBILE_LPM_POLICY
 	int "Default SATA Link Power Management policy"
 	range 0 4
-	default 0
+	default 3
 	depends on SATA_AHCI
 	help
 	  Select the Default SATA Link Power Management (LPM) policy to use
Signature · 1 line
2.44.0

Applied:
https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux.git/log/?h=for-6.11