[Chapel Merge] Disable cache-remote prefetching read-aheads under

Branch: refs/heads/main
Revision: 46fce1b
Author: ronawho
Log Message:

Merge pull request #18230 from ronawho/fix-cache-readahead-ugni

Disable cache-remote prefetching read-aheads under ugni

[co-designed with @mppf, reviewed by @gbtitus]

The cache supports a read-ahead feature where it will GET an entire page
if it detects sequential access across multiple user GETs. It also
supports a more aggressive prefetching read-ahead that will prefetch
additional pages if it thinks they could be needed. This more aggressive
read-ahead relied on chpl_comm_addr_gettable, where the cache is
asking the comm layer if it's safe to GET this memory.

The implementation of chpl_comm_addr_gettable was broken under ugni
because it was only checking if the starting address was GETable, but it
did not check that the entire range was. So we could easily cross a page
boundary and start trying to do GETs from unregistered and potentially
unreadable memory. We could have fixed this by just checking that it was
safe to do a GET on every page, but in looking at this we realized that
with dynamic registration (the default under ugni) a concurrent task
could de-register memory between the GETable call and the GET, so to be
safe we just have chpl_comm_addr_gettable return false now. We could
do something smarter when a fixed heap is being used, but that's not a
common configuration and it's not one we test regularly so I didn't want
to introduce more differences.

Resolves https://github.com/Cray/chapel-private/issues/2358
Resolves https://github.com/cray/chapel-private/issues/2397

Modified Files:
M runtime/include/chpl-comm.h

M runtime/src/comm/ugni/comm-ugni.c

Compare: https://github.com/chapel-lang/chapel/compare/e8c1adb52867...46fce1b14400