Linux Dirty Data Update via Device-Specific Search Tree
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for updating dirty data in Linux systems require turning off devices or synchronously writing all dirty data, which wastes time and delays critical data preservation, especially when the percentage of dirty data in the buffer memory is small.
Innovation Solution
A system and method that includes a determination module, transmission module, seeking module, search tree module, and update module to allow users to update dirty data pages of a designated raw device to a magnetic disk asynchronously or synchronously without interrupting the device, using a Linux system with a user configuration and kernel configuration.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If the Kernel buffers dirty data in memory to raise memory utilization rate, then memory utilization rate is improved, but data loss risk increases when power outage occurs
Solution Approach 1:
The invention segments the dirty data management by introducing a device-specific dirty data link list that separates dirty data by block device. This allows selective flushing of dirty data from specific devices without affecting other devices, enabling targeted data preservation while maintaining high memory utilization overall.
Solution Approach 2:
The invention implements preliminary action by providing a mechanism to proactively flush dirty data before power outage occurs. The user can initiate a flush operation on specific devices when needed, rather than waiting for regular intervals or forced updates, thus preserving critical data while maintaining buffering for non-critical data.
2Reliability
If the Kernel writes all dirty data synchronously to magnetic disk, then data integrity is improved, but system performance deteriorates
Solution Approach 1:
The invention segments the flush operation to work on a per-device basis rather than flushing all dirty data from all devices simultaneously. This allows the system to maintain data integrity for critical devices while avoiding the performance penalty of flushing all buffered data, thus resolving the contradiction between reliability and productivity.
Solution Approach 2:
The invention applies partial action by allowing users to flush dirty data from specific block devices only when needed, rather than flushing all dirty data. This partial flushing approach ensures data integrity for important devices while minimizing the performance impact on the overall system.
3Reliability
If the user closes the block device to update dirty data, then data preservation is improved, but device availability deteriorates
Solution Approach 1:
The invention segments the dirty data management by device, allowing independent flush operations on specific block devices without affecting other devices. This enables data preservation on critical devices while maintaining availability of non-critical devices, eliminating the need to close entire devices for updates.
Solution Approach 2:
The invention introduces an intermediary mechanism (the device-specific dirty data link list and selective flush function) that mediates between data preservation needs and device availability. This allows dirty data to be flushed from specific devices without closing them, thus preserving data while maintaining device availability for continued operation.
4Reliability
If the Kernel searches dirty data at regular time intervals, then data loss risk is reduced, but time consumption increases
Solution Approach 1:
The invention maintains the periodic action approach of regular dirty data searches but enhances it by allowing user-initiated selective flush operations. This combines periodic checking with on-demand action, reducing the need for frequent full-system scans while maintaining data safety through targeted flushes when users identify critical data preservation needs.
Data Source
AI summary
A system and method for updating dirty data of designated raw device is applied in Linux system. A format of a command parameter for updating the dirty data of the designated raw device is determined, to obtain the command parameter with the correct format and transmit it into the Kernel of the Linux system. Then, a data structure of the designated raw device is sought based on the command parameter, to obtain a fast search tree of the designated raw device. Finally, all dirty data pages of the designated raw device are found by the fast search tree, and then are updated into a magnetic disk in a synchronous or asynchronous manner. Therefore, the dirty data of an individual raw device can be updated and written into the magnetic disk without interrupting the normal operation of the system, hereby ensuring secure, convenient, and highly efficient update of the dirty data.


