summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-02-06 00:13:11 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-02-06 00:13:11 (GMT)
commit7d124cb7961ad0089aa6a18e1c2e08e351d8ba86 (patch)
treead15291f07d0d102b95940e936213a659b5eda19
parente272e64e7492a934c456f652ce023a8952e727b3 (diff)
downloadhdf5-7d124cb7961ad0089aa6a18e1c2e08e351d8ba86.zip
hdf5-7d124cb7961ad0089aa6a18e1c2e08e351d8ba86.tar.gz
hdf5-7d124cb7961ad0089aa6a18e1c2e08e351d8ba86.tar.bz2
Modification based on feedback from pull request.
-rw-r--r--src/H5AC.c5
-rw-r--r--src/H5Cprivate.h2
-rw-r--r--src/H5Ctag.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 4801194..440dfd8 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -2403,6 +2403,11 @@ H5AC_cork(H5F_t *f, haddr_t obj_addr, unsigned action, hbool_t *corked)
HDassert(H5F_addr_defined(obj_addr));
HDassert(action == H5AC__SET_CORK || action == H5AC__UNCORK || action == H5AC__GET_CORKED);
+ /* Skip the search on "tag_list" when there are no "corked" objects.
+ * This is done to mitigate the slow down when closing objects.
+ * Re-visit this optimization when we optimize tag info management
+ * in the future.
+ */
if(action == H5AC__GET_CORKED) {
HDassert(corked);
if(H5C_get_num_objs_corked(f->shared->cache) == 0) {
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index ee2d033..d4ed6fc 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -2301,7 +2301,7 @@ H5_DLL herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr,
unsigned int tests);
H5_DLL herr_t H5C_ignore_tags(H5C_t *cache_ptr);
H5_DLL hbool_t H5C_get_ignore_tags(const H5C_t *cache_ptr);
-H5_DLL hbool_t H5C_get_num_objs_corked(const H5C_t *cache_ptr);
+H5_DLL uint32_t H5C_get_num_objs_corked(const H5C_t *cache_ptr);
H5_DLL herr_t H5C_retag_entries(H5C_t * cache_ptr, haddr_t src_tag, haddr_t dest_tag);
H5_DLL herr_t H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked);
H5_DLL herr_t H5C_get_entry_ring(const H5F_t *f, haddr_t addr, H5C_ring_t *ring);
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 611ff37..807e68d 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -185,7 +185,7 @@ H5C_get_ignore_tags(const H5C_t *cache_ptr)
*
*-------------------------------------------------------------------------
*/
-hbool_t
+uint32_t
H5C_get_num_objs_corked(const H5C_t *cache_ptr)
{
FUNC_ENTER_NOAPI_NOERR