Fast and Power-Efficient System Suspend

System suspend is what happens when you shut your laptop’s lid. The machine will go into a state where it ideally consumes little to no power while being able to return to where you were as quickly as possible when you open the lid again. 

Traditional approaches to implementing system suspend encompass ACPI S3 and ACPI S4. ACPI S3, also known as suspend-to-memory, is a design that powers off the entire system except for the memory during suspend in order to allow for a rapid return when waking up the system: only minimal platform re-initialization is required during resume and all the operating system and application data is still present in RAM. ACPI S4, also known as suspend-to-disk, works by persisting the entire system memory contents to mass storage from where it can be recovered again upon resume. The system is then fully powered off while suspended. Suspend-to-idle (s2idle, S0ix) is a modern variant of suspend-to-memory that fundamentally works similar to ACPI S3 but is entirely operating system-based and does not require firmware intervention. In turn, it allows for an even faster resume than ACPI S3 and allows the system to wake up via network events, e.g., notifications. 

The fundamental trade-off here is clear: while ACPI S4 is very energy-efficient, it takes very long to resume, whereas ACPI S3 and S0ix continue to consume a certain amount of energy while suspended, but are very quick to resume. 

Our research aims to develop a novel design for system suspend that unites the advantages of the two approaches by leveraging CXL-based hybrid SSDs and their persistent memory properties. Fundamentally, our approach persists the entire system memory to a hybrid SSD and then powers off the system, similar to ACPI S4. However, as a CXL-based hybrid SSD allows the host system to access the device as if it were memory, we can drastically shortcut the time it takes to resume compared to ACPI S4 by resuming directly from the SSD instead of slowly restoring blocks into host DRAM first. To reduce the impact of potentially slow NAND accesses, we implement a smart prefetching algorithm that begins to run as early as possible during firmware initialization to ensure a smooth user experience. Ideally, our goal is to be nearly as fast as ACPI S3 in terms of resume time, while also being nearly as energy-efficient as ACPI S4. 

We are actively working on implementing our suspend approach based on coreboot, an open-source system firmware project, and our custom CXL-based hybrid SSD prototype. We have demonstrated a preliminary implementation at OSFC 2024.

Contact: Yussuf Khalil