changeset 9345c4320477 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9345c4320477
description:
mem, config: Selective use of snoop filter
Disable the default snoop filter in the SystemXBar so that the
typical membus does not have a snoop filter by default. Instead,
add the snoop filter only when there are caches added to the system
(with the caches / l2cache options).
The underlying problem is that the snoop filter grows without
bounds (for now) if there are no caches to tell it that lines have
been evicted. This causes slow regression runs for all the atomic
regressions. This patch fixes this behaviour.
diffstat:
configs/common/CacheConfig.py | 5 +++++
tests/configs/base_config.py | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diffs (38 lines):
diff -r 024291dab733 -r 9345c4320477 configs/common/CacheConfig.py
--- a/configs/common/CacheConfig.py Mon May 30 02:10:48 2016 -0400
+++ b/configs/common/CacheConfig.py Fri May 27 17:05:58 2016 +0100
@@ -153,6 +153,11 @@
else:
system.cpu[i].connectAllPorts(system.membus)
+ # Add a snoop filter to the membus if there are caches above it
+ if (options.l2cache or options.caches) and \
+ (system.membus.snoop_filter == NULL):
+ system.membus.snoop_filter = SnoopFilter()
+
return system
# ExternalSlave provides a "port", but when that port connects to a cache,
diff -r 024291dab733 -r 9345c4320477 tests/configs/base_config.py
--- a/tests/configs/base_config.py Mon May 30 02:10:48 2016 -0400
+++ b/tests/configs/base_config.py Fri May 27 17:05:58 2016 +0100
@@ -126,6 +126,9 @@
cpu.createInterruptController()
cpu.connectAllPorts(sha_bus if sha_bus != None else system.membus,
system.membus)
+ # System has caches before the membus -> add snoop filter
+ if sha_bus and system.membus.snoop_filter == NULL:
+ system.membus.snoop_filter = SnoopFilter()
def init_kvm(self, system):
"""Do KVM-specific system initialization.
@@ -149,6 +152,9 @@
self.init_kvm(system)
sha_bus = self.create_caches_shared(system)
+ # System has caches before the membus -> add snoop filter
+ if sha_bus and system.membus.snoop_filter == NULL:
+ system.membus.snoop_filter = SnoopFilter()
for cpu in system.cpu:
self.init_cpu(system, cpu, sha_bus)
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev