Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2382921rwb; Mon, 19 Sep 2022 04:28:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CU2wKU5Uhvei0T0WrLV+BKe+huRbHRa+ZrJ2mL6wF5hXQfdeOcufwOeqEVE+0vf27nkeL X-Received: by 2002:a17:907:a40b:b0:781:1874:d066 with SMTP id sg11-20020a170907a40b00b007811874d066mr5624776ejc.384.1663586912342; Mon, 19 Sep 2022 04:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663586912; cv=none; d=google.com; s=arc-20160816; b=cIgmcJ9A850mhWYVQVTmyqFdsjpaZZA9mFNmxRF5grKl1hHuL9eeLDP3PDGQS+DxUy 7qIg7dESHxmOimlS7Bcs7FEINn8YTx/2cNkatwSm1lveKEudDA94RYtweK+MKEiBZUfF Y8CE5qvtCR6wtCVNWIpbw6d5f9pgvuGU46tUoFsRE6l4ySKMipsPbxJ3Y8JjyG9SHv9Y HRNrM7zpAdaKWT/Q4kEK1x+gabjg3UeW4X5hZBdI29jbxcmcYgn85U+fTYVJJwT25ELf n0FLTstCQlTOQIJmPkc44FaLPjR24bOxiCBBSgBS/mVjA9Ny+61AVW2jszccYIebfuti qw0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+Bz0UOQAJOXRrtdCnmyKdFMTMhYr8+15WKdruE59Rlc=; b=Ko4aCt0veXjMs62LwMDgLDDq58dXyJGhn7Jya2utcpIHVR2WJz+VjVeF+ej78RLJ6M wt7QqlG8VKjYaG7slKTS67r6y14qKkA7FnUo8iBJuiBXqMdVyp1UUIAJjNwbg+b1Jmzg JvWG2sXWwS+ZE4Md8LfWOSdCHe1H3frRpxDe/FTT51Yw6Kd27kfyhSskhL39i3FSYCsq v8jMIK5+Ka60maV7qTa9loUR+9cYB9HvRmPMt6Uz8bXvT3DJxkHy40mIS4ZORQn3gDNJ OiUAQlj3jQFuLhjSjNXhcQ4ly8UlDKIGZF50ufQo34l9klh7uXoEexE/Cu/tLa4lDIjq NOQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L9YGiNDS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020aa7d50b000000b004477568d7a4si8712741edq.215.2022.09.19.04.28.06; Mon, 19 Sep 2022 04:28:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L9YGiNDS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbiISLQ5 (ORCPT + 99 others); Mon, 19 Sep 2022 07:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbiISLQy (ORCPT ); Mon, 19 Sep 2022 07:16:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AE4EFD1C for ; Mon, 19 Sep 2022 04:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663586211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+Bz0UOQAJOXRrtdCnmyKdFMTMhYr8+15WKdruE59Rlc=; b=L9YGiNDSPdrtnbHPEmwLi07HgdqrQ5+jJ6wsB/03HVjG12/VccOPy4ENm6+GpjZuntSjXc TeO/gejrrn1d8UKZ28fAQfCls2EpsJ7wXuzZKTBTu33Nfbky59unMgeiRr5+FUDjkZ3T5w 2aZnIVTHhPEGcac61TTJSCNJ+5aYpcM= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-675-L9QZF5VHOiCAZm77Fewz7w-1; Mon, 19 Sep 2022 07:16:50 -0400 X-MC-Unique: L9QZF5VHOiCAZm77Fewz7w-1 Received: by mail-wm1-f72.google.com with SMTP id k38-20020a05600c1ca600b003b49a809168so4513217wms.5 for ; Mon, 19 Sep 2022 04:16:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=+Bz0UOQAJOXRrtdCnmyKdFMTMhYr8+15WKdruE59Rlc=; b=RjpD/FRlkXGOu8tNWHTTJSyFRlND95NfblNJY3fK/1MW1EPbe6XGl4eoVPfisLDvlp XyxegVb/ctNYKRARAGGb29tS7Eao8oXCmdmLVzHbGk3MoGot2JOM+plTSWxC2YzqVCSc Ue2xIioOaB0JBjvmDUoMDGonUbN4COFgtZHUbouFaYZSgL4PlpjEA+gmpm6eng+nNVgD 2nPozOarAhbEsVZpGpAya5OlMbEM6prHXqff7oXn8mndOPqtcCniYCWezbCPUT8YkqO/ w/wvTAw9uLu+9qJnclw89NN6XxYTXCJWFf/w2qvF9u3nn3WGIvERBJFMgbEw+bo1TB2e wBbw== X-Gm-Message-State: ACrzQf2FQ1pJE0D2hCYMw/3Rb9+buv81oOKE9cBych5rKRuoDTnxIBvb 0+Bv6tN4jE61PsRBzIqXJxdptKmHYfdlI5C6YlAvwFVeVxTiCQdJHw3SN6RM11RCkEGC/jYhAun UNZMoft0d6Eg3yUC9B27DwGVb X-Received: by 2002:a5d:58f8:0:b0:22a:f284:496e with SMTP id f24-20020a5d58f8000000b0022af284496emr5928694wrd.501.1663586208789; Mon, 19 Sep 2022 04:16:48 -0700 (PDT) X-Received: by 2002:a5d:58f8:0:b0:22a:f284:496e with SMTP id f24-20020a5d58f8000000b0022af284496emr5928681wrd.501.1663586208587; Mon, 19 Sep 2022 04:16:48 -0700 (PDT) Received: from p1.Home ([2001:8a0:6724:4500:dc68:d331:1862:9fcb]) by smtp.gmail.com with ESMTPSA id k21-20020adfb355000000b0022584c82c80sm13424911wrd.19.2022.09.19.04.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 04:16:47 -0700 (PDT) From: Eric Curtin To: Damien Le Moal , linux-ide@vger.kernel.org Cc: Eric Curtin , linux-kernel@vger.kernel.org, Brian Masney , Al Stone , Alexander Larsson , Andrew Halaney , Javier Martinez Canillas , Joe Konno Subject: [PATCH] ata: ahci: Enable/Disable ATA Staggered Spin-up by default Date: Mon, 19 Sep 2022 10:46:39 +0100 Message-Id: <20220919094635.184804-1-ecurtin@redhat.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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