All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Mario.Limonciello@dell.com
Cc: rafael@kernel.org, linux-acpi@vger.kernel.org, lenb@kernel.org,
	luto@kernel.org
Subject: Re: [PATCH] acpi/sleep: Use the FADT to prefer Suspend-to-Idle instead of S3
Date: Thu, 17 Nov 2016 16:25:50 +0100	[thread overview]
Message-ID: <1870300.pUnYT5AraT@vostro.rjw.lan> (raw)
In-Reply-To: <7dafc2f8e66f4aeb9c242640af2e4988@ausx13mpc120.AMER.DELL.COM>

On Wednesday, November 16, 2016 08:18:13 PM Mario.Limonciello@dell.com wrote:
> > -----Original Message-----
> > From: rjwysocki@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of
> > Rafael J. Wysocki
> > Sent: Thursday, November 10, 2016 5:54 PM
> > To: Limonciello, Mario <Mario_Limonciello@Dell.com>
> > Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Len Brown
> > <lenb@kernel.org>; Rafael J . Wysocki <rjw@rjwysocki.net>; Andy
> > Lutomirski <luto@kernel.org>
> > Subject: Re: [PATCH] acpi/sleep: Use the FADT to prefer Suspend-to-Idle
> > instead of S3
> > 
> > On Thu, Nov 10, 2016 at 10:35 PM, Mario Limonciello
> > <mario.limonciello@dell.com> wrote:
> > > If the ACPI_FADT_LOW_POWER_S0 bit is set, this indicates the platform
> > > should get identical or better performance using Suspend-To-Idle.
> > >
> > > By removing S3 and S1 userspace will prefer suspend-to-idle in
> > > these situations too.
> > >
> > > Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
> > > ---
> > >  drivers/acpi/sleep.c | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > >
> > > diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> > > index deb0ff7..ff1d8f1 100644
> > > --- a/drivers/acpi/sleep.c
> > > +++ b/drivers/acpi/sleep.c
> > > @@ -171,6 +171,12 @@ static int __init init_nvs_nosave(const struct
> > dmi_system_id *d)
> > >         return 0;
> > >  }
> > >
> > > +static bool suspend_to_idle_preferred(void)
> > > +{
> > > +       return (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0);
> > > +}
> > > +
> > > +
> > >  static struct dmi_system_id acpisleep_dmi_table[] __initdata = {
> > >         {
> > >         .callback = init_old_suspend_ordering,
> > > @@ -908,6 +914,11 @@ int __init acpi_sleep_init(void)
> > >                 acpi_no_s5 = true;
> > >         }
> > >
> > > +       if (suspend_to_idle_preferred()) {
> > > +               sleep_states[ACPI_STATE_S3] = 0;
> > > +               sleep_states[ACPI_STATE_S1] = 0;
> > > +       }
> > > +
> > >         supported[0] = 0;
> > >         for (i = 0; i < ACPI_S_STATE_COUNT; i++) {
> > >                 if (sleep_states[i])
> > > --
> > 
> > I'd do that in a different way.
> > 
> > Let me cut a patch for that (I haven't had the time to do that yet)
> > and we'll see.
> > 
> > Thanks,
> > Rafael
> 
> OK, look forward to seeing the approach you want to go with this
> instead.

Please have a look at

https://patchwork.kernel.org/patch/9433421/
https://patchwork.kernel.org/patch/9433429/

Thanks,
Rafael


      reply	other threads:[~2016-11-17 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 21:35 [PATCH] acpi/sleep: Use the FADT to prefer Suspend-to-Idle instead of S3 Mario Limonciello
2016-11-10 22:15 ` kbuild test robot
2016-11-10 22:35   ` Mario.Limonciello
2016-11-10 23:53 ` Rafael J. Wysocki
2016-11-16 20:18   ` Mario.Limonciello
2016-11-17 15:25     ` Rafael J. Wysocki [this message]

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=1870300.pUnYT5AraT@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=Mario.Limonciello@dell.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.