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/H5C.c | |
parent | 768ddffaa3be008e94d81daf577da1c5255484c2 (diff) | |
download | hdf5-DECTRIS_20131231.zip hdf5-DECTRIS_20131231.tar.gz hdf5-DECTRIS_20131231.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/H5C.c')
-rw-r--r-- | src/H5C.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -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 ) || |