TL;DR
CoTAM (Coherence-Aware Task Graph Modeling) is a novel framework that builds realistic task graphs by explicitly accounting for the "hidden" overhead of cache coherence. By capturing these implicit inter-task dependencies, CoTAM enables more accurate system-level optimizations, achieving up to a 15.4% speedup over traditional task-parallelism strategies in multicore environments.
What Problem Does This Paper Address?
In the world of multicore processing, designers rely on task graphs—visual maps of how tasks depend on one another—to decide how to map and schedule work across cores. However, most real-world applications don't come with a pre-defined graph. They are dynamic and data-dependent.
Existing modeling tools often miss a critical factor: cache coherence. When multiple cores share data, hardware protocols (like MESI) trigger background actions—invalidations, data transfers, and stalls—to keep memory consistent. These actions create "implicit" dependencies. If Task A modifies data that Task B needs, Task B might stall even if there is no explicit "message" sent between them in the code. Ignoring these coherence-induced delays leads to a "mismatch" between design-time assumptions and runtime reality, resulting in suboptimal performance and congested Networks-on-Chips (NoCs).
Methods
The authors propose CoTAM, which constructs a Directed Acyclic Graph (DAG) that reflects actual runtime behavior. The framework operates through four key stages:
- Coherence Behaviour Decoupling: Instead of looking at execution time as a single block, CoTAM separates it into computation, communication, and "coherence time." It uses metrics like private cache hit ratios and coherence message counts to isolate the impact of the coherence protocol.
- Metric Weighting (Softmax-over-Variance): Not all coherence metrics are equally important. CoTAM uses a statistical approach where metrics that show high variance across cores are given more weight, as they are more "discriminative" in identifying unique task relationships.
- Directional Dependency Scoring: The framework computes a score for every pair of tasks. This score quantifies the likelihood that one task depends on another based on observed core-level coherence events. Crucially, these scores are asymmetric, reflecting the one-way nature of many coherence actions (e.g., Core 1 invalidating Core 2’s cache).
- Graph Construction and Acyclicity: Using two thresholds (strong and weak), CoTAM filters these scores to create edges in a graph. It then applies a cycle-elimination algorithm to ensure the final output is a valid DAG, suitable for standard scheduling tools.
Datasets
The researchers evaluated CoTAM using the Gem5 simulator in full-system mode, which provides a cycle-accurate environment for cache-coherent multicore systems. They tested the framework against three representative workloads from the PARSEC benchmark suite:
- Canneal: Memory-intensive with high data sharing.
- Blackscholes: Compute-bound with minimal sharing.
- Fluidanimate: Features fine-grained parallelism.
They compared CoTAM against a baseline inspired by TP-PARSEC, a widely adopted task-parallelism strategy that lacks explicit coherence modeling.
Key Insights and Ideas
- Coherence as a First-Class Citizen: The core "aha" moment is treating cache coherence not as noise, but as a functional dependency. By modeling it explicitly, the task graph becomes a much more "faithful" representation of reality.
- The Variance Insight: The authors realized that if a coherence metric is uniform across all cores, it provides little information about specific task interactions. By focusing on high-variance metrics, CoTAM automatically tunes itself to the most relevant performance bottlenecks of a specific application.
- Asymmetry Matters: Traditional communication models often assume symmetric costs. CoTAM recognizes that coherence is often lopsided, which is vital for accurate task placement on a 2D Mesh NoC.
Key Results
- Performance Boost: CoTAM consistently outperformed the baseline, with speedups increasing as the system scaled. At 64 cores, it achieved an average speedup of 1.154x (15.4%).
- NoC Efficiency: By using CoTAM-generated graphs for heuristic task mapping, the researchers reduced total coherence time by up to 4.28% and average packet delay by 1.93%.
- Granularity Tolerance: The framework proved robust across different task granularities, though it performed best when the ratio of tasks to cores was between 0.5 and 6.
- Threshold Sensitivity: The study found that a "relaxed" threshold (capturing both strong and moderate dependencies) yielded the best balance between model accuracy and scheduling complexity.
Limitations and Future Work
- Simulation Overhead: CoTAM currently relies on iterative simulation to gather metrics. For extremely large-scale applications with long execution times, this "profile-then-model" approach could become a bottleneck.
- Static vs. Dynamic: While CoTAM models dynamic behavior, the resulting graph is still used for static or quasi-static design decisions.
- Future Directions: The authors suggest that future iterations could move toward more "online" modeling, where the task graph is updated in real-time to adapt to phase changes in long-running applications. They also aim to explore more complex coherence protocols beyond directory-based MESI.
Summary updated