Do you need to use put and get to safely access object in `global_ptr` ?

Issue #22 resolved
BrianS created an issue

This came up at times in the atomic domains discussions. handing over control of a memory segment to the NIC. If I want RDMA to work to the gasnet segment then don't we need to surrender safe access to that region to the NIC? then don't we have a word tearing problem if the user has a raw pointer and is doing load/store to that location?

Comments (3)

  1. Dan Bonachea

    The short answer is this problem only applies to AMO's that implement an atomic read-modify-write on the NIC, not to regular RDMA put/get. The main reason is put is just a write and we don't guarantee anything about the contents of target memory (eg lack of word tearing) if there are two or more concurrent writes (using any mechanism) updating the same location.

    The long answer also involves a discussion of the memory model, what it means for a put to be globally complete and the details of how GASNet implements remote completion on a given RDMA platform. However these are semantic details that normal (ie data-race-free) apps will usually be able to ignore.

  2. BrianS reporter

    OK, that works for me. It is the same as the shared memory model in terms of memory model from what I can tell, except put/get that uses the NIC are not guaranteed to execute in issue-order

  3. Log in to comment