diff options
author | David Young <dyoung@hdfgroup.org> | 2020-04-16 22:03:25 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-04-16 22:03:25 (GMT) |
commit | 69e95c37481ef98279a368ef4206f48e3688a014 (patch) | |
tree | 25ffd4faacde62cb3ede43b42b541e9169adb319 /src/H5C.c | |
parent | 71b7a186ef963b31529ecfd7467a32ef268ded62 (diff) | |
download | hdf5-69e95c37481ef98279a368ef4206f48e3688a014.zip hdf5-69e95c37481ef98279a368ef4206f48e3688a014.tar.gz hdf5-69e95c37481ef98279a368ef4206f48e3688a014.tar.bz2 |
Add a log outlet for metadata cache (MDC) invalidations,
`mdc_invalidation`, and use it to log a message when
H5C_evict_or_refresh_all_entries_in_page() does not find any affected
entries.
Pass a page length to H5C_evict_or_refresh_all_entries_in_page() so that
it can assert if a multipage eviction overlaps a single-page entry,
which had better not happen.
Fix a bug in H5F_vfd_swmr_reader_end_of_tick() and heavily rework it:
remove page-table entries and evict/refresh MDC entries that overlap
*added* shadow-index entries. Because we didn't do that before, in the
zoo test, the reader didn't see all of the changes made by the writer
until the writer closed the file: MDC entries covered the new content
in the shadow file.
In H5F_vfd_swmr_reader_end_of_tick(), log changes to the shadow index
with the new outlet, `shadow_index_update`.
Convert a some of John's disused diagnostic printfs to an
`hlog_fast(eot, ...)` call.
Diffstat (limited to 'src/H5C.c')
-rw-r--r-- | src/H5C.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -980,7 +980,7 @@ done: */ herr_t H5C_evict_or_refresh_all_entries_in_page(H5F_t * f, uint64_t page, - uint64_t tick) + uint32_t length, uint64_t tick) { int i; size_t image_len; @@ -994,6 +994,7 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t * f, uint64_t page, H5C_cache_entry_t * entry_ptr; H5C_cache_entry_t * follow_ptr = NULL; herr_t ret_value = SUCCEED; /* Return value */ + bool found = false; FUNC_ENTER_NOAPI(FAIL) @@ -1031,6 +1032,11 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t * f, uint64_t page, HDassert(entry_ptr->addr >= (haddr_t)(page * cache_ptr->page_size)); HDassert(entry_ptr->addr < (haddr_t)((page+1) * cache_ptr->page_size)); + HDassert(length == cache_ptr->page_size || + page * cache_ptr->page_size + length >= + entry_ptr->addr + entry_ptr->size); + + found = true; /* since end of tick occurs only on API call entry in * the VFD SWMR reader case, the entry must not be protected. @@ -1299,6 +1305,11 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t * f, uint64_t page, entry_ptr = entry_ptr->pi_next; } + if (!found) { + hlog_fast(mdc_invalidation, "no MDC match for page %" PRIu64 + " length %" PRIu32 " tick %" PRIu64, page, length, tick); + } + done: FUNC_LEAVE_NOAPI(ret_value) |