arch, mem: Initial Hardware Transactional Memory implementation
authorTimothy Hayes <timothy.hayes@arm.com>
Fri, 10 Jan 2020 17:06:24 +0000 (17:06 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 2 Sep 2020 08:30:11 +0000 (08:30 +0000)
commitb01b455537934d662584f4bf21385d95b0eca8b7
tree0a09dd9dafe726fa2d63c224dfa7796c498e7403
parent21fdd4290b07fdd164c905d0495e41ac442a6ce6
arch, mem: Initial Hardware Transactional Memory implementation

Gem5 Hardware Transactional Memory (HTM)

Here we provide a brief note describing HTM support in Gem5 at
a high level.

HTM is an architectural feature that enables speculative concurrency in
a shared-memory system; groups of instructions known as transactions are
executed as an atomic unit. The system allows that transactions be
executed concurrently but intervenes if a transaction's
atomicity/isolation is jeapordised and takes corrective action. In this
implementation, corrective active explicitely means rolling back a
thread's architectural state and reverting any memory updates to a point
just before the transaction began.

This HTM implementation relies on--
(1) A checkpointing mechanism for architectural register state.
(2) Buffering speculative memory updates.

This patch is focusing on the definition of the HTM checkpoint (1)

The checkpointing mechanism is architecture dependent. Each ISA
leveraging HTM support can define a class HTMCheckpoint inhereting from
the generic one (GenericISA::HTMCheckpoint).

Those will need to save/restore the architectural state by overriding
the virtual HTMCheckpoint::save (when starting a transaction) and
HTMCheckpoint::restore (when aborting a transaction).

Instances of this class live in O3's ThreadState and Atomic's
SimpleThread.  It is up to the ISA to populate this instance when
executing an instruction that begins a new transaction.

JIRA: https://gem5.atlassian.net/browse/GEM5-587

Change-Id: Icd8d1913d23652d78fe89e930ab1e302eb52363d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30314
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/generic/SConscript
src/arch/generic/htm.cc [new file with mode: 0644]
src/arch/generic/htm.hh [new file with mode: 0644]
src/mem/SConscript
src/mem/htm.cc [new file with mode: 0644]
src/mem/htm.hh [new file with mode: 0644]