Branch: refs/heads/master
Revision: 75b2f0c
Author: mppf
Log Message:
Merge pull request #16905 from mppf/comm-diags-cache-hit-miss
Include cache GET and PUT hit/miss counters in CommDiagnostics
Resolves #16884
Although #16884 proposed more, this PR just adds counters for GET and PUT
hits and misses.
An operation is a “hit” if the cache structures already existed for all
pages accessed by it and a “miss” otherwise. Note that under this
definition a prefetch started too late to matter is still a “hit”. This
is an approximation but one that allows the classification of an
operation into hit or miss to be independent of time/comms latency.
In detail, this PR:
- adjusts comm diagnostic counters to use a relaxed atomic update which
is appropriate for a counter - removes an assert in the cache that was overly specific
- adds tests that use the new counters to check that cache invalidation
and readahead are working.
Future work:
- reorder the fields in the comm diagnostics record if reordering will
make them easier to work with. E.g. perhaps GET hits and misses should
be after GETs rather than at the end. Also, perhaps the AMs should be
before the GETs and PUTs. This is particularly relevant for the order
of columns in the table output. - add a way of counting automatic and manual prefetches including
whether prefetches we too late (i.e. a GET had to wait for the
operation to complete) - add a way of counting invalidated pages (or fences)
- look into multi-page readahead which seems to be requiring too many
cache misses
Reviewed by @gbtitus - thanks!
- [x] full local gasnet testing
Modified Files:
A test/optimizations/cache-remote/ferguson/comm_counting/COMPOPTS
A test/optimizations/cache-remote/ferguson/comm_counting/NUMLOCALES
A test/optimizations/cache-remote/ferguson/comm_counting/SKIPIF
A test/optimizations/cache-remote/ferguson/comm_counting/mycopy.chpl
A test/optimizations/cache-remote/ferguson/comm_counting/mycopy.good
A test/optimizations/cache-remote/ferguson/comm_counting/ra_prefetch.chpl
A test/optimizations/cache-remote/ferguson/comm_counting/ra_prefetch.good
A test/optimizations/cache-remote/ferguson/comm_counting/test-invalidate.chpl
A test/optimizations/cache-remote/ferguson/comm_counting/test-invalidate.good
A test/optimizations/cache-remote/ferguson/comm_counting/test-readahead.chpl
A test/optimizations/cache-remote/ferguson/comm_counting/test-readahead.good
R test/optimizations/cache-remote/ferguson/reduces_comm/COMPOPTS
R test/optimizations/cache-remote/ferguson/reduces_comm/NUMLOCALES
R test/optimizations/cache-remote/ferguson/reduces_comm/SKIPIF
R test/optimizations/cache-remote/ferguson/reduces_comm/mycopy.chpl
R test/optimizations/cache-remote/ferguson/reduces_comm/mycopy.good
R test/optimizations/cache-remote/ferguson/reduces_comm/ra_prefetch.chpl
R test/optimizations/cache-remote/ferguson/reduces_comm/ra_prefetch.good
M modules/standard/CommDiagnostics.chpl
M runtime/include/chpl-cache.h
M runtime/include/chpl-comm-diags.h
M runtime/src/chpl-cache.c
M test/library/standard/CommDiagnostics/commDiagsTable.comm-none.good
M test/library/standard/CommDiagnostics/commDiagsTable.good
M test/library/standard/CommDiagnostics/commDiagsTable.na-none.good
Compare: Comparing f3c5b28d1e7f...75b2f0cad550 · chapel-lang/chapel · GitHub