DMA Data Migration with Dual-Write Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current mechanisms for migrating data subject to access by input/output devices using direct memory access (DMA) are inadequate, as they often disrupt system operations or require impractical implementation of I/O page fault recovery code, especially when dealing with systems like PCI-E buses that lack mechanisms for temporarily disabling DMA operations without affecting other transfers.
Innovation Solution
A method that migrates data by ensuring read data is fetched from the source page and write data is stored in both the source and destination pages, utilizing a migration mode bit in the translation control entry (TCE) table to manage DMA operations, allowing for continuous DMA access during data copying and ensuring data integrity through atomic operations and validation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data is migrated while I/O devices access it via DMA, then system operations continue without disruption, but data consistency and integrity cannot be maintained
Solution Approach 1:
The system performs preliminary actions by copying data to a destination page before I/O devices complete their DMA operations. The migration process is initiated while data is still being accessed, and completion is determined by monitoring DMA operation status rather than requiring exclusive access first.
Solution Approach 2:
The system uses feedback mechanisms to monitor DMA operation status and determine when data migration is complete. The migration process responds to DMA completion signals and adjusts its behavior accordingly, allowing continuous operation while maintaining data consistency through ongoing monitoring.
2Reliability
If DMA operations are temporarily disabled during data migration, then data consistency is maintained, but system productivity decreases and other transfers are adversely affected
Solution Approach 1:
The system maintains continuity of useful action by allowing DMA operations to continue during data migration. Instead of disabling DMA, the system copies data in parallel and uses completion monitoring to ensure consistency, keeping both migration and I/O operations active simultaneously.
Solution Approach 2:
The system segments the data migration process into independent copy operations that run parallel to DMA transfers. The migration function copies data blocks while DMA operations continue, and completion is tracked separately, allowing both processes to execute without interfering with each other.
3Adaptability or versatility
If I/O page fault recovery code is implemented in all device drivers, then data migration with DMA access becomes possible, but device complexity and implementation difficulty increase
Solution Approach 1:
The system uses self-service mechanisms where the memory management unit automatically handles data migration and completion monitoring without requiring specialized driver code. The migration process is transparent to I/O devices, and completion is determined through hardware-assisted monitoring rather than driver-level intervention.
Solution Approach 2:
The system introduces an intermediary mechanism in the memory management unit that handles the complexity of data migration and DMA coordination. This intermediary layer abstracts the migration process from device drivers, allowing standard DMA operations to work with migrating data without requiring drivers to implement recovery code.
Data Source
Figure 1~2
Figure 3
Figure 4A
AI summary
A computer implemented method, data processing system, and computer usable program code are provided for migrating data accessible by devices using direct memory access. A request is received to migrate data. The data is migrated from a source page to a destination page in response to the request to migrate the data. Read data for the direct memory access are fetched from the source page. Write data for the direct memory access are stored in both the source page and the destination page.