Storage I/O Completion Checking Under CPU Contention
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for detecting input/output completion times in storage devices, such as interrupt, polling, and hybrid polling, suffer from performance degradation due to context switching, cache misses, and inaccurate latency predictions, especially in high-contention CPU scenarios, leading to inefficient CPU usage and reduced I/O performance.
Innovation Solution
An apparatus and method that dynamically switch between interrupt, polling, and adaptive hybrid polling techniques based on CPU contention, using adaptive hybrid polling as the default mode, and adjusting sleep durations based on real-time CPU usage and timer failures to optimize I/O performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If interrupt technique is used to detect I/O completion, then CPU can wait in idle state without context switching, but I/O performance is degraded due to overhead of context switching and interrupt handler processing
Solution Approach 1:
The patent implements dynamic mode switching between interrupt, polling, and adaptive hybrid polling techniques based on real-time CPU contention detection. The system transitions from static interrupt handling to adaptive polling when CPU contention is detected, optimizing I/O completion detection based on system state
Solution Approach 2:
The system changes the I/O completion detection parameter dynamically by selecting different techniques (interrupt vs. polling vs. adaptive hybrid polling) based on CPU contention levels. When CPU contention exceeds a threshold, the system switches from interrupt mode to adaptive hybrid polling mode
2Loss of time
If polling technique is used to detect I/O completion, then I/O request process can be immediately resumed without context switching, but CPU usage rises to 100% causing performance degradation
Solution Approach 1:
The adaptive hybrid polling technique performs partial polling by sleeping for a calculated duration based on recent I/O latency patterns before checking completion status. This reduces CPU usage compared to continuous polling while still achieving relatively prompt I/O completion detection
Solution Approach 2:
The system uses feedback from recent I/O latency measurements to dynamically adjust the sleep duration in adaptive hybrid polling. By learning from past I/O completion times, the system optimizes the balance between CPU usage and I/O completion detection speed
3Use of energy by moving object
If hybrid polling with epoch-based sleep duration determination is used, then unnecessary CPU usage is prevented, but accuracy in predicting I/O completion time drops when I/O latency changes drastically
Solution Approach 1:
The patent replaces static epoch-based sleep duration with dynamic adaptive hybrid polling that adjusts sleep duration based on real-time I/O latency patterns. The system continuously adapts to changing I/O latency conditions by learning from recent measurements
Solution Approach 2:
The adaptive hybrid polling mechanism serves itself by automatically adjusting its sleep duration based on observed I/O latency patterns without external intervention. The system learns from its own performance history to optimize future polling behavior
4Productivity
If adaptive hybrid polling is used as default mode, then I/O performance is optimized by selecting most advantageous technique, but system complexity increases due to dynamic mode switching
Solution Approach 1:
The patent segments the I/O completion detection into distinct modes (interrupt, polling, adaptive hybrid polling) with clear transition criteria. This modular approach manages complexity by defining specific conditions for switching between well-defined states
Data Source
AI summary
The present disclosure relates to an apparatus and a method for processing input/output completion of a storage device. The apparatus includes: an input/output command generation unit that generates an input/output command for the storage device: an input/output completion checking method determination unit that provides an input/output request to the storage device based on the input/output command and determines an input/output completion checking method for the storage device; and an input/output completion determination unit that performs an input/output checking procedure according to the input/output completion checking method and determines whether the input/output command is completed. Therefore, the present disclosure may dynamically switch to the most advantageous technique for detecting I/O completion of the storage device, depending on CPU contention arising from CPU sharing of an I/O request process, and may improve I/O performance by quickly detecting the I/O completion of the storage device.


