From a37b03ced9c3f2a1ea832144a3d8087148ec77de Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Mon, 18 Feb 2013 20:37:36 -0800 Subject: Adding a check to prevent writeback cache with allocation-on-fill. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15277] --- src/gpgpu-sim/gpu-cache.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/gpgpu-sim/gpu-cache.h b/src/gpgpu-sim/gpu-cache.h index fb59c01..6dce6b4 100644 --- a/src/gpgpu-sim/gpu-cache.h +++ b/src/gpgpu-sim/gpu-cache.h @@ -179,6 +179,19 @@ public: default: exit_parse_error(); } + // detect invalid configuration + if (m_alloc_policy == ON_FILL and m_write_policy == WRITE_BACK) { + // A writeback cache with allocate-on-fill policy will inevitably lead to deadlock: + // The deadlock happens when an incoming cache-fill evicts a dirty + // line, generating a writeback request. If the memory subsystem + // is congested, the interconnection network may not have + // sufficient buffer for the writeback request. This stalls the + // incoming cache-fill. The stall may propagate through the memory + // subsystem back to the output port of the same core, creating a + // deadlock where the wrtieback request and the incoming cache-fill + // are stalling each other. + assert(0 && "Invalid cache configuration: Writeback cache cannot allocate new line on fill. "); + } } bool disabled() const { return m_disabled;} unsigned get_line_sz() const -- cgit v1.3