Page MenuHomeFreeBSD

Suspend to idle support
Needs ReviewPublic

Authored by bwidawsk on Oct 23 2018, 10:17 PM.

Details

Reviewers
jhb
Summary

This patch series implements suspend to idle. It was developed on github
here:
https://github.com/bwidawsk/freebsd/tree/suspend-to-idle

Suspend to idle is like s3 except instead of using ACPI to suspend and resume,
it simply idles the CPU. Please see the commit messages on github for a
description of the individual changes. In short, you mean specify S0IDLE for
certain sysctls to enable the support.

For example, sysctl hw.acpi.suspend_state=S0IDLE, will make acpiconf -s3 use
suspend to idle instead of the default (NONE or S3).

On top of this series will be support for s0ix (emulated s3), and then after
that, hopefully some sort of runtime power management. Emulated S3 support is
"done" and being debugged is here:
https://github.com/bwidawsk/freebsd/tree/s0ix

Test Plan

Set suspend to use suspend to idle, use power button to wake machine.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 20374
Build 19815: arc lint + arc unit

Event Timeline

bwidawsk created this revision.Oct 23 2018, 10:17 PM
jhb added a comment.Nov 15 2018, 6:57 PM

Is this one ready to be reviewed?

I think so. I think there are definitely some robustifications needed, but generally it'd be good to know if I need any major overhauls. Also, at this point in the series, it's entirely opt-in, and any regressions should be fixable.

lwhsu added a subscriber: lwhsu.Dec 4 2018, 5:02 PM
imp added a subscriber: imp.Apr 11 2019, 3:22 PM
imp added inline comments.
sys/dev/acpica/acpi.c
2927

Would it be appropriate to have a printf here? I'm on the fence about this.

2994

Same comment as above.

4006

I see s2idle and other things like that in the rest of the code. Do we need that here too?

sys/dev/acpica/acpivar.h
73

would it make sense to make this a named struct instead of repeating?

scottl added a subscriber: scottl.Wed, Jun 12, 7:59 PM