Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm
@ 2024-05-02  9:26 Niklas Cassel
  2024-05-02  9:40 ` Damien Le Moal
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Niklas Cassel @ 2024-05-02  9:26 UTC (permalink / raw)
  To: Damien Le Moal, Niklas Cassel; +Cc: Mario Limonciello, linux-ide

From: Mario Limonciello <mario.limonciello@amd.com>

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).

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
[cassel: rebased and reworded commit message]
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index b595494ab9b4..e00536b49552 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -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
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm
  2024-05-02  9:26 [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm Niklas Cassel
@ 2024-05-02  9:40 ` Damien Le Moal
  2024-05-06 16:11   ` Niklas Cassel
  2024-05-27  8:25   ` Niklas Cassel
  2024-05-27  8:50 ` Damien Le Moal
  2024-05-27  9:44 ` Niklas Cassel
  2 siblings, 2 replies; 6+ messages in thread
From: Damien Le Moal @ 2024-05-02  9:40 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: Mario Limonciello, linux-ide

On 5/2/24 18:26, Niklas Cassel wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> 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).
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> [cassel: rebased and reworded commit message]
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
> ---
>  drivers/ata/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index b595494ab9b4..e00536b49552 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -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.

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm
  2024-05-02  9:40 ` Damien Le Moal
@ 2024-05-06 16:11   ` Niklas Cassel
  2024-05-27  8:25   ` Niklas Cassel
  1 sibling, 0 replies; 6+ messages in thread
From: Niklas Cassel @ 2024-05-06 16:11 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Mario Limonciello, linux-ide

On Thu, May 02, 2024 at 06:40:11PM +0900, Damien Le Moal wrote:
> On 5/2/24 18:26, Niklas Cassel wrote:
> > From: Mario Limonciello <mario.limonciello@amd.com>
> > 
> > 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).
> > 
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > [cassel: rebased and reworded commit message]
> > Signed-off-by: Niklas Cassel <cassel@kernel.org>
> > ---
> >  drivers/ata/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> > index b595494ab9b4..e00536b49552 100644
> > --- a/drivers/ata/Kconfig
> > +++ b/drivers/ata/Kconfig
> > @@ -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.

Sounds good to me.


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm
  2024-05-02  9:40 ` Damien Le Moal
  2024-05-06 16:11   ` Niklas Cassel
@ 2024-05-27  8:25   ` Niklas Cassel
  1 sibling, 0 replies; 6+ messages in thread
From: Niklas Cassel @ 2024-05-27  8:25 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Mario Limonciello, linux-ide

On Thu, May 02, 2024 at 06:40:11PM +0900, Damien Le Moal wrote:
> On 5/2/24 18:26, Niklas Cassel wrote:
> > From: Mario Limonciello <mario.limonciello@amd.com>
> > 
> > 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).
> > 
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > [cassel: rebased and reworded commit message]
> > Signed-off-by: Niklas Cassel <cassel@kernel.org>
> > ---
> >  drivers/ata/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> > index b595494ab9b4..e00536b49552 100644
> > --- a/drivers/ata/Kconfig
> > +++ b/drivers/ata/Kconfig
> > @@ -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.

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


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm
  2024-05-02  9:26 [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm Niklas Cassel
  2024-05-02  9:40 ` Damien Le Moal
@ 2024-05-27  8:50 ` Damien Le Moal
  2024-05-27  9:44 ` Niklas Cassel
  2 siblings, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2024-05-27  8:50 UTC (permalink / raw)
  To: Niklas Cassel; +Cc: Mario Limonciello, linux-ide

On 5/2/24 6:26 PM, Niklas Cassel wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> 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).
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> [cassel: rebased and reworded commit message]
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
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.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

> ---
>  drivers/ata/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index b595494ab9b4..e00536b49552 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -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

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm
  2024-05-02  9:26 [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm Niklas Cassel
  2024-05-02  9:40 ` Damien Le Moal
  2024-05-27  8:50 ` Damien Le Moal
@ 2024-05-27  9:44 ` Niklas Cassel
  2 siblings, 0 replies; 6+ messages in thread
From: Niklas Cassel @ 2024-05-27  9:44 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Mario Limonciello, linux-ide

On Thu, May 02, 2024 at 11:26:53AM +0200, Niklas Cassel wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> 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).
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> [cassel: rebased and reworded commit message]
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
> ---
>  drivers/ata/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index b595494ab9b4..e00536b49552 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -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
> -- 
> 2.44.0
> 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-27  9:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02  9:26 [PATCH] ata: Kconfig: Update SATA_MOBILE_LPM_POLICY default to med_power_with_dipm Niklas Cassel
2024-05-02  9:40 ` Damien Le Moal
2024-05-06 16:11   ` Niklas Cassel
2024-05-27  8:25   ` Niklas Cassel
2024-05-27  8:50 ` Damien Le Moal
2024-05-27  9:44 ` Niklas Cassel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox