diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-05 15:23:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-05 15:23:20 (GMT) |
commit | 6b1208407f5886c917f1ebb38bac058eeb980e30 (patch) | |
tree | 6b29e7da66abf76d1ed3e1b7ea52b7a7638f3534 /src/H5F.c | |
parent | c72c322f6265f121cfd2542f081875f42c9d6fed (diff) | |
download | hdf5-6b1208407f5886c917f1ebb38bac058eeb980e30.zip hdf5-6b1208407f5886c917f1ebb38bac058eeb980e30.tar.gz hdf5-6b1208407f5886c917f1ebb38bac058eeb980e30.tar.bz2 |
[svn-r5536] Purpose:
New feature.
Description:
Added a "small data" block allocation mechanism to the library, similar to
the mechanism used for allocating metadata currently.
See the RFC for more details:
http://hdf.ncsa.uiuc.edu/RFC/SmallData/SmallData.html
This reduces the number of I/O operations which hit the disk for my test
program from 19 to 15 (i.e. from 393 to 15, overall).
Platforms tested:
Solaris 2.7 (arabica) w/FORTRAN and FreeBSD 4.5 (sleipnir) w/C++
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -193,8 +193,9 @@ H5F_init_interface(void) double rdcc_w0 = H5F_ACS_PREEMPT_READ_CHUNKS_DEF; hsize_t threshold = H5F_ACS_ALIGN_THRHD_DEF; hsize_t alignment = H5F_ACS_ALIGN_DEF; - size_t meta_block_size = H5F_ACS_META_BLOCK_SIZE_DEF; + hsize_t meta_block_size = H5F_ACS_META_BLOCK_SIZE_DEF; size_t sieve_buf_size = H5F_ACS_SIEVE_BUF_SIZE_DEF; + hsize_t sdata_block_size = H5F_ACS_SDATA_BLOCK_SIZE_DEF; unsigned gc_ref = H5F_ACS_GARBG_COLCT_REF_DEF; hid_t driver_id = H5F_ACS_FILE_DRV_ID_DEF; void *driver_info = H5F_ACS_FILE_DRV_INFO_DEF; @@ -358,6 +359,10 @@ H5F_init_interface(void) if(H5P_register(acs_pclass,H5F_ACS_SIEVE_BUF_SIZE_NAME,H5F_ACS_SIEVE_BUF_SIZE_SIZE, &sieve_buf_size,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); + /* Register the minimum "small data" allocation block size */ + if(H5P_register(acs_pclass,H5F_ACS_SDATA_BLOCK_SIZE_NAME,H5F_ACS_SDATA_BLOCK_SIZE_SIZE, &sdata_block_size,NULL,NULL,NULL,NULL,NULL,NULL)<0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); + /* Register the garbage collection reference */ if(H5P_register(acs_pclass,H5F_ACS_GARBG_COLCT_REF_NAME,H5F_ACS_GARBG_COLCT_REF_SIZE, &gc_ref,NULL,NULL,NULL,NULL,NULL,NULL)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class"); @@ -850,6 +855,8 @@ H5Fget_access_plist(hid_t file_id) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set meta data cache size"); if(H5P_set(new_plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't sieve buffer size"); + if(H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->lf->def_sdata_block_size)) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' cache size"); if(H5P_set(new_plist, H5F_ACS_FILE_DRV_ID_NAME, &(f->shared->lf->driver_id)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file driver ID"); |