Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sync to doorbell function to avoid weak consistency bug
Due to the way POWER works, there is no guarantee that a memory location written by 1 thread is actually visible to another thread unless you explicitly assert a sync of some kind. In the code that runs to wake up new cores, there is a path where memory is written by 1 thread (usually on the master processor) but is immediately consumed by a new thread that just woke up. It is possible for the new thread to consume the memory and not see the contents that were written by the other thread. The fix is to add a sync command before we send the doorbell msgsnd operation. This will ensure the memory contents are visible to the thread as soon as it wakes up. Change-Id: I8a1483dd7bbda5af064ba6d004dc9e0a3a61ce78 CQ: SW453195 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70311 Reviewed-by: Dean Sanner <[email protected]> Reviewed-by: Nicholas E. Bofferding <[email protected]> Tested-by: Jenkins Server <[email protected]> Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins OP HW <[email protected]> Reviewed-by: Daniel M. Crowell <[email protected]>
- Loading branch information