From: Eric Curtin <ecurtin@redhat.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
linux-ide@vger.kernel.org
Cc: Eric Curtin <ecurtin@redhat.com>,
linux-kernel@vger.kernel.org, Brian Masney <bmasney@redhat.com>,
Al Stone <ahs3@redhat.com>, Alexander Larsson <alexl@redhat.com>,
Andrew Halaney <ahalaney@redhat.com>,
Javier Martinez Canillas <javierm@redhat.com>,
Joe Konno <joe.konno@intel.com>
Subject: [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default
Date: Mon, 19 Sep 2022 10:46:39 +0100 [thread overview]
Message-ID: <20220919094635.184804-1-ecurtin@redhat.com> (raw)
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
next reply other threads:[~2022-09-19 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 9:46 Eric Curtin [this message]
2022-09-20 6:33 ` [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default Christoph Hellwig
2022-09-20 9:04 ` Eric Curtin
2022-09-20 9:12 ` Christoph Hellwig
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=20220919094635.184804-1-ecurtin@redhat.com \
--to=ecurtin@redhat.com \
--cc=ahalaney@redhat.com \
--cc=ahs3@redhat.com \
--cc=alexl@redhat.com \
--cc=bmasney@redhat.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=javierm@redhat.com \
--cc=joe.konno@intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.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