mem-cache: Fix priority of multi compressor
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Sun, 5 Apr 2020 21:24:08 +0000 (23:24 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Thu, 30 Apr 2020 22:14:09 +0000 (22:14 +0000)
commit73c8c72e40917b3d3ab1643630ee0fc2cb8d0da4
tree66d9a5a1f5d2a5b02b1c808cf480ffc46ba3e218
parent81c359b50fc054b58627f3d9e184da0b5834199a
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 <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28367
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/compressors/multi.cc