From: Ciro Santilli Date: Wed, 20 Nov 2019 16:51:47 +0000 (+0000) Subject: sim-se: don't wake up threads that are halted on futex X-Git-Tag: v19.0.0.0~270 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e488a91dccc9708501156d0bc4a45fad47f471d;p=gem5.git sim-se: don't wake up threads that are halted on futex At Ia6b4d3e6148c64721d810b8f1fffaa208a394b06 the futex wake up started skipping selecting threads that are already awake, which already prevented some deadlocks. However, threads that are Halting or Halted should not be woken up either, as those represent cores in which processes have already exited. Before this commit, this could lead an exited core to wake up, which would then immediately re-execute the exit syscall, and possibly leave one genuinely sleeping core locked and: Exiting @ tick 18446744073709551615 because simulate() limit reached Change-Id: I1531b56d605d47252dc0620bb3e755b7cf84df97 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22963 Reviewed-by: Jason Lowe-Power Reviewed-by: Brandon Potter Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/sim/futex_map.hh b/src/sim/futex_map.hh index 5e60f7c37..bbb484a5e 100644 --- a/src/sim/futex_map.hh +++ b/src/sim/futex_map.hh @@ -158,7 +158,7 @@ class FutexMap : public std::unordered_map // must only count threads that were actually // woken up by this syscall. auto& tc = waiterList.front().tc; - if (tc->status() != ThreadContext::Active) { + if (tc->status() == ThreadContext::Suspended) { tc->activate(); woken_up++; }