Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
include/ofi_atomic_queue: properly align atomic values
The atomic queue implementation uses atomic operations to allow threads/processes to claim and comit entries into the queue. Because of the use of atomics, padding is essential to allow atomic values to have a dedicated cache line (as atomics will lock the cache line over the course of the operation). The atomic queue already had padding between the atomics to make sure they were not on the same cache line as each other but this didn't take into account the other fields that might be accessed by other processes as well such as the size and size mask. This could also potentially cause issues with any fields immediately preceeding the queue as well as with fields within the entrytype. This patch requires the AQ base address to be cache line aligned and pads the atomic values properly so that they are guaranteed to be on their own cache line. This patch also changes the shm AQ alignment to 64 to adhere to this new requirement. Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
- Loading branch information