diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2014-01-31 23:15:13 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2014-01-31 23:15:13 (GMT) |
commit | 6a2fbff85be6168186a6c49498d7bb4e53f10b8f (patch) | |
tree | 15022a1cb33b6d97fde575aadd9849170ff5a7f2 /src | |
parent | 768ddffaa3be008e94d81daf577da1c5255484c2 (diff) | |
download | hdf5-6a2fbff85be6168186a6c49498d7bb4e53f10b8f.zip hdf5-6a2fbff85be6168186a6c49498d7bb4e53f10b8f.tar.gz hdf5-6a2fbff85be6168186a6c49498d7bb4e53f10b8f.tar.bz2 |
[svn-r24675] 1) Add cork status to H5AC/H5C_get_entry_status().DECTRIS_20131231
2) Skip dirty corked entries when doing auto ageout entries in the cache.
Tested on koala, jam, platypus, ostrich.
PENDING: code review and more cache related tests.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5AC.c | 5 | ||||
-rw-r--r-- | src/H5ACprivate.h | 1 | ||||
-rw-r--r-- | src/H5C.c | 19 | ||||
-rw-r--r-- | src/H5Cprivate.h | 1 |
4 files changed, 22 insertions, 4 deletions
@@ -944,6 +944,7 @@ H5AC_get_entry_status(const H5F_t *f, hbool_t is_dirty; hbool_t is_protected; hbool_t is_pinned; + hbool_t is_corked; hbool_t is_flush_dep_child; hbool_t is_flush_dep_parent; size_t entry_size; @@ -956,7 +957,7 @@ H5AC_get_entry_status(const H5F_t *f, HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad param(s) on entry.") if(H5C_get_entry_status(f, addr, &entry_size, &in_cache, &is_dirty, - &is_protected, &is_pinned, &is_flush_dep_parent, &is_flush_dep_child) < 0) + &is_protected, &is_pinned, &is_corked, &is_flush_dep_parent, &is_flush_dep_child) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_get_entry_status() failed.") if(in_cache) { @@ -967,6 +968,8 @@ H5AC_get_entry_status(const H5F_t *f, status |= H5AC_ES__IS_PROTECTED; if(is_pinned) status |= H5AC_ES__IS_PINNED; + if(is_corked) + status |= H5AC_ES__IS_CORKED; if(is_flush_dep_parent) status |= H5AC_ES__IS_FLUSH_DEP_PARENT; if(is_flush_dep_child) diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 2fa8277..b78c277 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -352,6 +352,7 @@ H5_DLLVAR hid_t H5AC_ind_dxpl_id; #define H5AC_ES__IS_PINNED 0x0008 #define H5AC_ES__IS_FLUSH_DEP_PARENT 0x0010 #define H5AC_ES__IS_FLUSH_DEP_CHILD 0x0020 +#define H5AC_ES__IS_CORKED 0x0040 /* external function declarations: */ @@ -2469,6 +2469,7 @@ H5C_get_entry_status(const H5F_t *f, hbool_t * is_dirty_ptr, hbool_t * is_protected_ptr, hbool_t * is_pinned_ptr, + hbool_t * is_corked_ptr, hbool_t * is_flush_dep_parent_ptr, hbool_t * is_flush_dep_child_ptr) { @@ -2529,6 +2530,11 @@ H5C_get_entry_status(const H5F_t *f, *is_pinned_ptr = entry_ptr->is_pinned; } + if ( is_corked_ptr != NULL ) { + + *is_corked_ptr = entry_ptr->is_corked; + } + if ( is_flush_dep_parent_ptr != NULL ) { *is_flush_dep_parent_ptr = (entry_ptr->flush_dep_nchildren > 0); @@ -7008,6 +7014,7 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, ( (entry_ptr->type)->id != H5C__EPOCH_MARKER_TYPE ) && ( bytes_evicted < eviction_size_limit ) ) { + hbool_t corked = FALSE; HDassert( ! (entry_ptr->is_protected) ); next_ptr = entry_ptr->next; @@ -7018,7 +7025,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, prev_is_dirty = prev_ptr->is_dirty; } - if ( entry_ptr->is_dirty ) { + /* dirty corked entry is skipped */ + if(entry_ptr->is_corked && entry_ptr->is_dirty) { + corked = TRUE; + result = TRUE; + } else if ( entry_ptr->is_dirty ) { result = H5C_flush_single_entry(f, primary_dxpl_id, @@ -7058,9 +7069,11 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f, HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "*prev_ptr corrupt") - } else + } #endif /* NDEBUG */ - if ( ( prev_ptr->is_dirty != prev_is_dirty ) + if(corked) { /* dirty corked entry is skipped */ + entry_ptr = prev_ptr; + } else if ( ( prev_ptr->is_dirty != prev_is_dirty ) || ( prev_ptr->next != next_ptr ) || diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 3ee74ea..6890c70 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -1166,6 +1166,7 @@ H5_DLL herr_t H5C_get_entry_status(const H5F_t *f, hbool_t * is_dirty_ptr, hbool_t * is_protected_ptr, hbool_t * is_pinned_ptr, + hbool_t * is_corked_ptr, hbool_t * is_flush_dep_parent_ptr, hbool_t * is_flush_dep_child_ptr); |