Adaptive-Tick Kernel Idle Detection Mechanism

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing processor scheduling mechanisms, such as those in the Linux kernel, face challenges in reducing OS jitter and conserving energy, particularly in real-time and high-performance computing applications, as they struggle to efficiently manage scheduling-clock interrupts, leading to unnecessary energy waste and scalability issues.

Innovation Solution

A method is introduced to detect a full-system idle state by implementing a hysteresis period and manipulating a global data structure to determine when scheduling clock ticks can be disabled on all CPUs, allowing all CPUs to enter an idle state without interruptions, thereby reducing memory contention and energy consumption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a timekeeping CPU is designated to maintain scheduling-clock interrupts, then timekeeping reliability is improved, but energy consumption increases and all CPUs cannot go idle

Engineering Contradiction:
Improvetimekeeping reliabilityVSAvoidenergy consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent makes the timekeeping CPU designation dynamic rather than static. The kernel tracks the number of non-idle CPUs and allows any CPU to become the timekeeping CPU when needed. This dynamic assignment enables CPUs to transition between idle and timekeeping roles, reducing energy consumption while maintaining timekeeping reliability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system uses the idle CPUs themselves to detect and report their idle state to the kernel. When all CPUs report idle, the kernel automatically designates one as the timekeeping CPU and shuts off interrupts for others. The CPUs self-manage their own idle state detection and reporting without external intervention.

Inventive Principle:
Principle #25Self-service

2Measurement precision

If scheduling-clock interrupts are maintained on one CPU, then timekeeping accuracy is preserved, but OS jitter increases for applications on other CPUs

Engineering Contradiction:
Improvetimekeeping accuracyVSAvoidOS jitter
Core Design Contradiction:
Measurement precisionVSObject-generated harmful factors

Solution Approach 1:

The patent extracts the scheduling-clock interrupt burden from application CPUs and consolidates it to a single designated timekeeping CPU. By removing interrupts from non-timekeeping CPUs, the harmful OS jitter is eliminated for those systems, while timekeeping accuracy is preserved on the dedicated CPU.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The kernel acts as an intermediary that manages the timekeeping CPU designation and coordinates interrupt distribution. It monitors CPU idle states, designates appropriate timekeeping CPUs, and manages the transition of interrupt responsibilities, thereby mediating between timekeeping accuracy requirements and jitter reduction goals.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If a global count of non-idle CPUs is maintained, then full-system idle detection is improved, but memory contention increases on large systems

Engineering Contradiction:
Improveidle state detection accuracyVSAvoidmemory contention
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the idle state tracking by maintaining per-CPU idle state information rather than a single global counter. Each CPU independently tracks its own idle state, and the kernel aggregates this information when needed. This segmentation reduces memory contention by eliminating the single-point bottleneck of a global counter on large-scale systems.

Inventive Principle:
Principle #1Segmentation

4Use of energy by moving object

If scheduling-clock interrupts are shut off for idle CPUs, then energy consumption is reduced, but difficulty in detecting full-system idle state increases

Engineering Contradiction:
Improveenergy consumptionVSAvoidfull-system idle state detection
Core Design Contradiction:
Use of energy by moving objectVSDifficulty of detecting and measuring

Solution Approach 1:

The patent implements preliminary action by having CPUs report their idle state to the kernel before actually shutting off interrupts. The kernel collects idle state information from all CPUs, determines full-system idle status, and then coordinates interrupt shutdown. This preliminary reporting mechanism enables accurate full-system idle detection while allowing timely interrupt suspension for energy savings.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9519307B2Detecting full-system idle state in adaptive-tick kernels
Publication Date: 2016.12.13 GLOBALFOUNDRIES US INC
  • US9519307B2 patent drawing
  • US9519307B2 patent drawing
  • US9519307B2 patent drawing

AI summary

A technique for detecting full-system idle state in an adaptive-tick kernel includes detecting non-timekeeping CPU idle state, initiating a hysteresis period, waiting for the hysteresis period to end, manipulating a data structure whose state indicates whether a scheduling clock tick may be disabled on all CPUs, and disabling the scheduling clock tick if the data structure is in an appropriate state. In a first embodiment, non-timekeeping CPUs manipulate a global counter when entering an idle state, but add hysteresis to avoid thrashing the counter. Timekeeping is turned off based on the count maintained on the global counter. In a second embodiment, a Read-Copy Update (RCU) dynticks-idle subsystem running on a timekeeping CPU manipulates a global state variable whose states indicate whether all non-timekeeping CPUs are in an idle state, and if so, for how long. Timekeeping is turned off based on the state of the global state variable.