mem-cache: Handle data expansion
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Wed, 8 Aug 2018 15:27:22 +0000 (17:27 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Wed, 8 May 2019 17:41:09 +0000 (17:41 +0000)
commite54c7a68f8bae79bc3fabac2534ef5af14cda9ae
tree9943727a964feb56fc08c1f4e2c90e499bee815b
parent273aacfe48e45bc3b73d91f5d4639ed8182fcb0c
mem-cache: Handle data expansion

When a block in compressed form is overwriten, it may change
its size. If the new compressed size is bigger, and the total
size becomes bigger than the block size, one or more blocks
will have to be evicted. This is called data expansion, or
fat writes.

This change assumes that a first level cache cannot have a
compressor, since otherwise data expansion should have been
handled for atomic operations and writes. As such, data
expansions should only be seen on writebacks. As writebacks
are forwarded to the next level when failed, there should
be no data expansions when servicing misses either.

This patch adds the functionality to handle data expansions
by evicting the co-allocated blocks to make room for an
expanded block.

Change-Id: I0bd77bf6446bfae336889940b2f75d6f0c87e533
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12087
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/base.cc
src/mem/cache/base.hh
src/mem/cache/tags/compressed_tags.cc
src/mem/cache/tags/compressed_tags.hh
src/mem/cache/tags/super_blk.cc
src/mem/cache/tags/super_blk.hh