diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2010-06-15 21:21:03 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2010-06-15 21:21:03 (GMT) |
commit | 686d856802341c3e6389532ee2b3617b74f6c0ce (patch) | |
tree | 6a42a36d02b4c087627b2d5bcfb4e115be37ee9e /src/H5Dpkg.h | |
parent | 60ecd356b2e24f125a5fd7abbdb57569af76f3ba (diff) | |
download | hdf5-686d856802341c3e6389532ee2b3617b74f6c0ce.zip hdf5-686d856802341c3e6389532ee2b3617b74f6c0ce.tar.gz hdf5-686d856802341c3e6389532ee2b3617b74f6c0ce.tar.bz2 |
[svn-r19006] Purpose: Improve performance of the the chunk cache
Description:
Previously, the chunk cache would, when looking for a chunk, alwaylook for the
chunk in the b-tree before checking the cache. Reworked the functions that
look up chunks to always check the cache first and avoid the b-tree lookup if
the chunk is in cache.
Tested: jam, linew, amani (h5committest)
Diffstat (limited to 'src/H5Dpkg.h')
-rw-r--r-- | src/H5Dpkg.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 0dc9a9f..34bf1da 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -260,6 +260,7 @@ typedef struct H5D_chunk_ud_t { H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */ /* Upward */ + unsigned idx_hint; /*index of chunk in cache, if present */ uint32_t nbytes; /*size of stored data */ unsigned filter_mask; /*excluded filters */ haddr_t addr; /*file address of chunk */ @@ -601,12 +602,12 @@ H5_DLL herr_t H5D_chunk_set_info(const H5D_t *dset); H5_DLL herr_t H5D_chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id); H5_DLL hbool_t H5D_chunk_is_space_alloc(const H5O_storage_t *storage); -H5_DLL herr_t H5D_chunk_get_info(const H5D_t *dset, hid_t dxpl_id, - const hsize_t *chunk_offset, H5D_chunk_ud_t *udata); +H5_DLL herr_t H5D_chunk_lookup(const H5D_t *dset, hid_t dxpl_id, + const hsize_t *chunk_offset, hsize_t chunk_idx, H5D_chunk_ud_t *udata); H5_DLL void *H5D_chunk_lock(const H5D_io_info_t *io_info, - H5D_chunk_ud_t *udata, hbool_t relax, unsigned *idx_hint/*in,out*/); + H5D_chunk_ud_t *udata, hbool_t relax); H5_DLL herr_t H5D_chunk_unlock(const H5D_io_info_t *io_info, - const H5D_chunk_ud_t *udata, hbool_t dirty, unsigned idx_hint, void *chunk, + const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk, uint32_t naccessed); H5_DLL herr_t H5D_chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes); H5_DLL herr_t H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id, |