Searched hist:9080 (Results 1 - 1 of 1) sorted by relevance

/gem5/src/mem/
H A Dabstract_mem.ccdiff 9080:753fc1c3618c Fri Jun 29 11:19:00 EDT 2012 Matt Evans <matt.evans@arm.com> Mem: Fix a livelock resulting in LLSC/locked memory access implementation.

Currently when multiple CPUs perform a load-linked/store-conditional sequence,
the loads all create a list of reservations which is then scanned when the
stores occur. A reservation matching the context and address of the store is
sought, BUT all reservations matching the address are also erased at this point.

The upshot is that a store-conditional will remove all reservations even if the
store itself does not succeed. A livelock was observed using 7-8 CPUs where a
thread would erase the reservations of other threads, not succeed, loop and put
its own reservation in again only to have it blown by another thread that
unsuccessfully now tries to store-conditional -- no forward progress was made,
hanging the system.

The correct way to do this is to only blow a reservation when a store
(conditional or not) actually /occurs/ to its address. One thread always wins
(the one that does the store-conditional first).

Completed in 18 milliseconds