From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
"open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)"
<linux-ide@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ata: ahci: Do not check ACPI_FADT_LOW_POWER_S0
Date: Thu, 25 Aug 2022 13:29:13 -0500 [thread overview]
Message-ID: <54e439c8-7390-be01-66b2-5692af571d1b@amd.com> (raw)
In-Reply-To: <CAJZ5v0in-me017RoR8yRMMXmbBofr6u9o2_WMGh38cpiy3cG3w@mail.gmail.com>
On 8/25/2022 13:26, Rafael J. Wysocki wrote:
> On Thu, Aug 25, 2022 at 8:17 PM Limonciello, Mario
> <mario.limonciello@amd.com> wrote:
>>
>> On 8/25/2022 13:01, Rafael J. Wysocki wrote:
>>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>
>>> The ACPI_FADT_LOW_POWER_S0 flag merely means that it is better to
>>> use low-power S0 idle on the given platform than S3 (provided that
>>> the latter is supported) and it doesn't preclude using either of
>>> them (which of them will be used depends on the choices made by user
>>> space).
>>>
>>> For this reason, there is no benefit from checking that flag in
>>> ahci_update_initial_lpm_policy().
>>>
>>> First off, it cannot be a bug to do S3 with policy set to either
>>> ATA_LPM_MIN_POWER_WITH_PARTIAL or ATA_LPM_MIN_POWER, because S3 can be
>>> used on systems with ACPI_FADT_LOW_POWER_S0 set and it must work if
>>> really supported, so the ACPI_FADT_LOW_POWER_S0 check is not needed to
>>> protect the S3-capable systems from failing.
>>>
>>> Second, suspend-to-idle can be carried out on a system with
>>> ACPI_FADT_LOW_POWER_S0 unset and it is expected to work, so if setting
>>> policy to either ATA_LPM_MIN_POWER_WITH_PARTIAL or ATA_LPM_MIN_POWER is
>>> needed to handle that case correctly, it should be done regardless of
>>> the ACPI_FADT_LOW_POWER_S0 value.
>>>
>>> Accordingly, drop the ACPI_FADT_LOW_POWER_S0 check from
>>> ahci_update_initial_lpm_policy() along with the CONFIG_ACPI #ifdef
>>> around it that is not necessary any more.
>>
>> Looking at the source commit for this behavior:
>>
>> b1a9585cc396 ("ata: ahci: Enable DEVSLP by default on x86 with SLP_S0")
>>
>> It was trying to set a policy tied to when the system is defaulting to
>> suspend to idle.
>>
>> To try to match the spirit of the original request but not tying it to
>> the FADT, how about using pm_suspend_default_s2idle()?
>
> The user can switch to "default S3" later anyway, so this wouldn't
> help more than the check being dropped.
Right, they could also change LPM policy to different policy later too
if they want.
This is just for setting up default policy. I think if you matched to
only when pm_suspend_default_s2idle() it would be the least likelihood
to change this default policy on unsuspecting people upgrading.
next prev parent reply other threads:[~2022-08-25 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 18:01 [PATCH v2] ata: ahci: Do not check ACPI_FADT_LOW_POWER_S0 Rafael J. Wysocki
2022-08-25 18:16 ` Limonciello, Mario
2022-08-25 18:26 ` Rafael J. Wysocki
2022-08-25 18:29 ` Limonciello, Mario [this message]
2022-08-25 18:36 ` Rafael J. Wysocki
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=54e439c8-7390-be01-66b2-5692af571d1b@amd.com \
--to=mario.limonciello@amd.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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