diff options
author | vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com> | 2021-06-16 19:24:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 19:24:26 (GMT) |
commit | a7f729581b1955479255f59337481d30ff17295f (patch) | |
tree | 92c963868b00f157e2ddacafb412b978596bd2c1 /src | |
parent | 4e2c1ffd77f3a1fdf3c1ca67d2474a1fcd649508 (diff) | |
download | hdf5-a7f729581b1955479255f59337481d30ff17295f.zip hdf5-a7f729581b1955479255f59337481d30ff17295f.tar.gz hdf5-a7f729581b1955479255f59337481d30ff17295f.tar.bz2 |
Maximum jump in tick for VFD SWMR reader (#752)
* Calculate the maximum jump in ticks for the reader and printed it out at file closing.
The max_log configured is printed out as well.
* Committing clang-format changes
* Change printing format as indicated in the PR feedback.
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fint.c | 6 | ||||
-rw-r--r-- | src/H5Fpkg.h | 1 | ||||
-rw-r--r-- | src/H5Fvfd_swmr.c | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index 3fa3e59..ae16626 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1573,6 +1573,12 @@ H5F__dest(H5F_t *f, hbool_t flush) /* Push error, but keep going*/ HDONE_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "vfd swmr prep for flush or close failed") + if ((f->shared->vfd_swmr) && (!f->shared->vfd_swmr_writer)) + HDfprintf(stdout, + "The maximum jump in ticks is %" PRIu64 + "; The maximum expected lag configured is %" PRIu32 "\n", + f->shared->max_jump_ticks, f->shared->vfd_swmr_config.max_lag); + /* Shutdown the page buffer cache */ if (H5PB_dest(f->shared) < 0) /* Push error, but keep going*/ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 14a4761..5ee6b7c 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -410,6 +410,7 @@ struct H5F_shared_t { * not */ uint64_t tick_num; /* Number of the current tick */ + uint64_t max_jump_ticks; /* Max # of jumps in tick number */ struct timespec end_of_tick; /* End time of the current tick */ lower_defree_queue_t lower_defrees; /* Records of lower-file space diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index 8d1888b..3b5eb40 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -203,6 +203,7 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create) HDassert(!shared->vfd_swmr_config.writer); shared->vfd_swmr_writer = FALSE; + shared->max_jump_ticks = 0; HDassert(shared->mdf_idx == NULL); @@ -1186,6 +1187,8 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api) "used/len = %" PRIu32 "/ %" PRIu32 " ---\n", shared->mdf_idx_entries_used, shared->mdf_idx_len); #endif /* JRM */ + shared->max_jump_ticks = MAX(shared->max_jump_ticks, (tmp_tick_num - shared->tick_num)); + /* At this point, we should have evicted or refreshed all stale * page buffer and metadata cache entries. * |