Page MenuHomeFreeBSD

Suspend to idle support
Needs ReviewPublic

Authored by bwidawsk on Oct 23 2018, 10:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 10:14 PM
Unknown Object (File)
Sun, Apr 7, 5:01 AM
Unknown Object (File)
Mar 8 2024, 4:37 PM
Unknown Object (File)
Feb 26 2024, 6:57 PM
Unknown Object (File)
Feb 24 2024, 7:37 AM
Unknown Object (File)
Feb 15 2024, 11:44 AM
Unknown Object (File)
Jan 18 2024, 12:49 PM
Unknown Object (File)
Jan 18 2024, 10:23 AM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 20374
Build 19815: arc lint + arc unit

Event Timeline

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.

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?