Multi-threaded Cache Management with Segmented LRU Stacks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional cache policy techniques struggle to effectively manage cache operations in highly multithreaded parallel processors, such as GPUs, due to the difficulty in detecting load and store patterns across thousands of concurrent threads and the limited cache capacities compared to serial processors.
Innovation Solution
A cache management architecture with multiple cache hierarchies and set-associative first-level data caches that implement specific cache operations and policies, including classification of allocation/replacement policies by request type and cache operations, one-clock invalidate-all, and last-use invalidate-all, to optimize cache usage and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional cache policy techniques are used to determine load and store patterns, then cache management can be performed, but pattern detection becomes extremely difficult when over 10,000 threads execute concurrently
Solution Approach 1:
The patent segments the cache management approach by implementing separate cache policies for different thread groups rather than attempting to manage all threads uniformly. The cache is divided into multiple cache ways, with each way dedicated to serving a specific group of threads. This segmentation allows each thread group to have its own LRU stack and replacement policy, making cache management tractable even with 10,000+ concurrent threads by breaking down the complex global problem into manageable local problems.
2Quantity of substance
If cache capacity per thread is increased to improve caching performance, then more data can be cached, but the limited cache capacities of multithreaded processors compared to serial processors constrain this approach
Solution Approach 1:
The patent merges the cache resources of multiple threads by implementing a shared cache structure where multiple thread groups share the same physical cache memory. Instead of allocating dedicated cache capacity to each thread (which would require enormous total cache capacity), the system combines threads into groups that share cache ways, with each way maintaining its own LRU stack. This merging approach allows efficient utilization of limited cache capacity while supporting thousands of concurrent threads.
Solution Approach 2:
The cache structure is designed to be universal by allowing the same physical cache memory to serve multiple thread groups simultaneously. Each cache way can be dynamically assigned to different thread groups based on current workload demands, and the LRU replacement policy works uniformly across all thread groups. This multi-functional design enables the cache to adapt to varying thread priorities and access patterns without requiring separate dedicated cache structures for each thread.
3Ease of operation
If LRU replacement policy is implemented for each thread group, then cache replacement can be managed effectively, but the complexity of managing multiple LRU stacks increases
Solution Approach 1:
The LRU replacement management is segmented by implementing separate LRU stacks for each cache way, where each stack independently tracks usage for its assigned thread group. This segmentation isolates the complexity of managing multiple LRU stacks into manageable units, where each stack only needs to track a subset of threads rather than all threads globally. The patent reduces overhead by implementing these segmented LRU stacks in hardware rather than software, eliminating the need for complex data structures and reducing management complexity.
Data Source
AI summary
A method for managing a parallel cache hierarchy in a processing unit. The method including receiving an instruction that includes a cache operations modifier that identifies a level of the parallel cache hierarchy in which to cache data associated with the instruction; and implementing a cache replacement policy based on the cache operations modifier.


