Lockless Metadata Binary Tree Access for Storage Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In information processing systems, accessing in-memory changes to metadata pages for both read and write operations can cause contention issues, leading to increased latency in the storage array due to the need for lock management during metadata page updates.
Innovation Solution
Implementing lockless metadata binary tree access functionality, where read operations can traverse the binary tree without requiring a spinlock, even when write operations are inserting new nodes, by utilizing a logical level lock to ensure consistency and allowing concurrent read access.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If lock management is used during metadata page updates, then data integrity is ensured, but latency increases due to contention on bucket spinlocks
Solution Approach 1:
The patent extracts the locking mechanism from the critical path of read operations. By using generation counters and version stamps, the system removes the need for spinlocks during reads, allowing concurrent access without contention while maintaining data integrity through version verification.
Solution Approach 2:
The patent introduces generation counters and version stamps as intermediary mechanisms that mediate between read and write operations. These intermediaries allow the system to track metadata page versions without requiring direct lock contention, enabling reads to proceed concurrently while writes update the version information.
2Productivity
If concurrent read and write operations are allowed, then system throughput improves, but contention issues arise on bucket spinlocks
Solution Approach 1:
The patent segments the metadata page access control into two independent parts: read operations use generation counter comparison while write operations use version stamp updates. This segmentation eliminates the need for a single shared lock, allowing both operations to proceed concurrently without contention on the same resource.
Solution Approach 2:
The patent changes the control parameter from lock acquisition status to generation counter and version stamp values. By comparing generation counters and version stamps instead of acquiring locks, the system enables concurrent access while maintaining consistency, thereby improving throughput without increasing contention complexity.
3Productivity
If in-memory changes are accessed for both read and write operations, then storage system performance improves, but contention on bucket spinlocks increases
Solution Approach 1:
The patent extracts the spinlock dependency from in-memory metadata access by implementing lockless read operations. Reads use generation counter comparison to determine consistency without acquiring locks, while writes update version stamps atomically. This extraction eliminates contention latency while maintaining the performance benefits of in-memory access.
Solution Approach 2:
The patent enables continuous read operations on in-memory metadata pages without interruption from lock acquisition. By using generation counters and version stamps, reads can continuously access and compare metadata versions while writes proceed independently, maintaining high storage system performance without contention delays.
Data Source
AI summary
A processing device is configured to obtain an input-output operation that corresponds to a first metadata page and to identify a corresponding binary tree. The binary tree comprises a plurality of nodes each comprising a delta corresponding to a metadata page. The processing device is further configured to perform a read traversal process corresponding to the first metadata page which comprises traversing the binary tree based at least in part on the first metadata page while the binary tree is locked by a node insertion process corresponding to a second metadata page. The node insertion process comprises inserting a first node corresponding to the second metadata page into the binary tree. The read traversal process further comprises locating a second node of the binary tree that corresponds to the first metadata page and obtaining a first delta that corresponds to the first metadata page from the second node.


