* [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default
@ 2022-09-19 9:46 Eric Curtin
2022-09-20 6:33 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Eric Curtin @ 2022-09-19 9:46 UTC (permalink / raw)
To: Damien Le Moal, linux-ide
Cc: Eric Curtin, linux-kernel, Brian Masney, Al Stone,
Alexander Larsson, Andrew Halaney, Javier Martinez Canillas,
Joe Konno
On some kernels tuned for performance, you want to always favour
spin-up time versus power draw. This adds the ability to always favour
spin-up time by default (disabling Staggered Spin-up favours
performance, rather than power draw).
Regardless of whether this is enabled or disabled the
libahci.ignore_sss option will override any kernel config.
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
---
drivers/ata/Kconfig | 15 +++++++++++++++
drivers/ata/libahci.c | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 1c9f4fb2595d..36b11fbcf644 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -67,6 +67,21 @@ config ATA_FORCE
If unsure, say Y.
+config ATA_SSS
+ bool "Enable ATA Staggered Spin-up by default"
+ default y
+ help
+ This option denotes whether Staggered Spin-up capability on
+ storage controllers is used. Staggered Spin-up reduces
+ peak power draw, but decreases performance. If this config is
+ set to N, Staggered Spin-up capability will be ignored by
+ default.
+
+ This can be overridden by using the kernel argument
+ libahci.ignore_sss.
+
+ If unsure, say Y.
+
config ATA_ACPI
bool "ATA ACPI Support"
depends on ACPI
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index cf8c7fd59ada..b7b573d47fda 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -33,7 +33,7 @@
#include "libata.h"
static int ahci_skip_host_reset;
-int ahci_ignore_sss;
+int ahci_ignore_sss = !IS_ENABLED(CONFIG_ATA_SSS);
EXPORT_SYMBOL_GPL(ahci_ignore_sss);
module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444);
--
2.37.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default
2022-09-19 9:46 [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default Eric Curtin
@ 2022-09-20 6:33 ` Christoph Hellwig
2022-09-20 9:04 ` Eric Curtin
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2022-09-20 6:33 UTC (permalink / raw)
To: Eric Curtin
Cc: Damien Le Moal, linux-ide, linux-kernel, Brian Masney, Al Stone,
Alexander Larsson, Andrew Halaney, Javier Martinez Canillas,
Joe Konno
Err, no. We should not add config options for every damn default.
If you want to force it on CONFIG_CMDLINE is your friend.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default
2022-09-20 6:33 ` Christoph Hellwig
@ 2022-09-20 9:04 ` Eric Curtin
2022-09-20 9:12 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Eric Curtin @ 2022-09-20 9:04 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Damien Le Moal, linux-ide, linux-kernel, Brian Masney, Al Stone,
Alexander Larsson, Andrew Halaney, Javier Martinez Canillas,
Joe Konno
The libahci.ignore_sss flag is something that is set by a number of
performance focused distros. The motivation behind this is to set
ignore_sss in a boolean fashion at compile time rather than depend on
cmdline parsing.
On Tue, 20 Sept 2022 at 07:56, Christoph Hellwig <hch@infradead.org> wrote:
>
> Err, no. We should not add config options for every damn default.
> If you want to force it on CONFIG_CMDLINE is your friend.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default
2022-09-20 9:04 ` Eric Curtin
@ 2022-09-20 9:12 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-09-20 9:12 UTC (permalink / raw)
To: Eric Curtin
Cc: Christoph Hellwig, Damien Le Moal, linux-ide, linux-kernel,
Brian Masney, Al Stone, Alexander Larsson, Andrew Halaney,
Javier Martinez Canillas, Joe Konno
On Tue, Sep 20, 2022 at 10:04:20AM +0100, Eric Curtin wrote:
> The libahci.ignore_sss flag is something that is set by a number of
> performance focused distros. The motivation behind this is to set
> ignore_sss in a boolean fashion at compile time rather than depend on
> cmdline parsing.
So set it in CONFIG_CMDLINE if you want it enabled at compile time.
The whole point of a built-in command line is to not add another
Kconfig option for every bloody option that someone wants a default
for.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-20 9:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19 9:46 [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default Eric Curtin
2022-09-20 6:33 ` Christoph Hellwig
2022-09-20 9:04 ` Eric Curtin
2022-09-20 9:12 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox