Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/28367 )

Change subject: mem-cache: Fix priority of multi compressor
......................................................................

mem-cache: Fix priority of multi compressor

The priority queue comparator orders such that false gives the
entry a higher priority. Therefore, if it is desired to make
the entry with lowest decompression latency have higher priority,
the comparison must be inverted.

Can be tested with:
  MultiCompressor(compressors=[
    PerfectCompressor(decompression_latency=1),
    PerfectCompressor(decompression_latency=2)])

Where it is expected that compressor0 (the one with decomp lat
of 1) is always chosen.

Change-Id: I44acbf5f51c6e47efdd2a16fba9596935cf2eb69
Signed-off-by: Daniel R. Carvalho <oda...@yahoo.com.br>
---
M src/mem/cache/compressors/multi.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/mem/cache/compressors/multi.cc b/src/mem/cache/compressors/multi.cc
index 599e059..fe22f5e 100644
--- a/src/mem/cache/compressors/multi.cc
+++ b/src/mem/cache/compressors/multi.cc
@@ -103,7 +103,7 @@
             if (lhs_cf == rhs_cf) {
                 // When they have similar compressed sizes, give the one
                 // with fastest decompression privilege
-                return lhs->decompLat < rhs->decompLat;
+                return lhs->decompLat > rhs->decompLat;
             }
             return lhs_cf < rhs_cf;
         }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/28367
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I44acbf5f51c6e47efdd2a16fba9596935cf2eb69
Gerrit-Change-Number: 28367
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to