summaryrefslogtreecommitdiffstats
path: root/src/H5Dbtree.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2012-03-13 15:58:47 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2012-03-13 15:58:47 (GMT)
commit3e468e6ff65d540a439e99ea568a6bff7add7cea (patch)
tree0dc67a660393540daf16623caae744dfdd8203df /src/H5Dbtree.c
parent73c139e29b45941dfc4e558d9096a0869a184260 (diff)
downloadhdf5-3e468e6ff65d540a439e99ea568a6bff7add7cea.zip
hdf5-3e468e6ff65d540a439e99ea568a6bff7add7cea.tar.gz
hdf5-3e468e6ff65d540a439e99ea568a6bff7add7cea.tar.bz2
[svn-r22062] Purpose: Fix bugs in chunk cache's SWMR implementation
Description: Two issues were found with the chunk cache's SWMR implementation: 1. Some places were not properly setting the rdcc field in the index udata struct. Fixed. May eventually need to add an rdcc field to the idx_info struct. 2. While recalculating the indices for chunks in a dataset being resized, it was possible for the chunk cache to attempt to flush a chunk before all the indices were updated, which caused problems when a node split and flush dependencies needed to be updated, because the child nodes could not be found in the chunk cache due to the index being out of date. Modified algorithm in H5D_chunk_update_cache to keep a temporary list of entries that got "bumped", and only evict them after all chunks have updated indices. Also modified H5D_chunk_update_flush_dep and H5D_chunk_update_flush_dep to search this temporary list when looking for the child chunk entry. As a side effect, chunks are now more likely to remain in cache after a call to H5Dset_extent (even without SWMR), so performance should improve slightly.
Diffstat (limited to 'src/H5Dbtree.c')
-rw-r--r--src/H5Dbtree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index f511d90..88fe4a5 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -151,7 +151,7 @@ static herr_t H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info,
hsize_t *size);
static herr_t H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
static herr_t H5D_btree_idx_support(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_ud_t *udata, H5AC_info_t *child_entry);
+ H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry);
static herr_t H5D_btree_idx_unsupport(const H5D_chk_idx_info_t *idx_info,
H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry);
static herr_t H5D_btree_idx_dump(const H5O_storage_chunk_t *storage,
@@ -993,6 +993,7 @@ H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Initialize "user" data for B-tree callbacks, etc. */
udata.layout = idx_info->layout;
udata.storage = idx_info->storage;
+ udata.rdcc = NULL;
/* Check for SWMR writes to the file */
if(H5F_INTENT(idx_info->f) & H5F_ACC_SWMR_WRITE) {
@@ -1614,7 +1615,7 @@ H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
*/
static htri_t
H5D_btree_idx_support(const H5D_chk_idx_info_t *idx_info,
- H5D_chunk_ud_t *udata, H5AC_info_t *child_entry)
+ H5D_chunk_common_ud_t *udata, H5AC_info_t *child_entry)
{
H5O_loc_t oloc; /* Temporary object header location for dataset */
H5O_t *oh = NULL; /* Dataset's object header */
@@ -1698,7 +1699,7 @@ H5D_btree_idx_unsupport(const H5D_chk_idx_info_t *idx_info,
if(NULL == (oh = H5O_pin(&oloc, idx_info->dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
- /* Add the flush dependency on the chunk */
+ /* Remove the flush dependency on the chunk */
if((ret_value = H5B_unsupport(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr,
udata, oh, child_entry)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTUNDEPEND, FAIL, "unable to destroy flush dependency on b-tree array metadata")