[svn-r27294] Description:

Clean up parameters to H5C__flush_single_entry: accept cache entry instead
of address, and make new flag for deleting entry from skiplist on destroy
instead of a separate parameter to the routine.

Tested on:
    MacOSX/64 10.10.3 (amazon) w/serial & parallel
    Linux/32 2.6.x (jam) w/serial & parallel
This commit is contained in:
Quincey Koziol 2015-06-29 10:19:34 -05:00
parent 8e94745298
commit 89115b11b0
6 changed files with 317 additions and 708 deletions

952
src/H5C.c

File diff suppressed because it is too large Load Diff

View File

@ -433,12 +433,7 @@ H5C_apply_candidate_list(H5F_t * f,
* will not call either the pre_serialize or serialize callbacks.
*/
if(H5C__flush_single_entry(f,
dxpl_id,
clear_ptr->addr,
H5C__FLUSH_CLEAR_ONLY_FLAG,
TRUE,
NULL) < 0)
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
} /* end if */
@ -483,12 +478,7 @@ H5C_apply_candidate_list(H5F_t * f,
cache_ptr->entries_removed_counter = 0;
cache_ptr->last_entry_removed_ptr = NULL;
if(H5C__flush_single_entry(f,
dxpl_id,
flush_ptr->addr,
H5C__NO_FLAGS_SET,
TRUE,
NULL) < 0)
if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry.")
if ( ( cache_ptr->entries_removed_counter > 1 ) ||
@ -647,13 +637,8 @@ H5C_apply_candidate_list(H5F_t * f,
(long long)clear_ptr->addr);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
if(H5C__flush_single_entry(f,
dxpl_id,
clear_ptr->addr,
H5C__FLUSH_CLEAR_ONLY_FLAG,
TRUE,
NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
} /* end else-if */
/* Else, if this process needs to independently flush this entry. */
@ -668,12 +653,7 @@ H5C_apply_candidate_list(H5F_t * f,
(long long)flush_ptr->addr);
#endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */
if(H5C__flush_single_entry(f,
dxpl_id,
flush_ptr->addr,
H5C__NO_FLAGS_SET,
TRUE,
NULL) < 0)
if(H5C__flush_single_entry(f, dxpl_id, flush_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
} /* end else-if */
} /* end if */
@ -714,14 +694,8 @@ H5C_apply_candidate_list(H5F_t * f,
entries_flushed++;
} /* end if */
if(H5C__flush_single_entry(f,
dxpl_id,
delayed_ptr->addr,
H5C__NO_FLAGS_SET,
TRUE,
NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL,
"Can't flush entry collectively.")
if(H5C__flush_single_entry(f, dxpl_id, delayed_ptr, H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't flush entry collectively.")
entries_flushed_collectively++;
entries_flushed_or_cleared_last++;
@ -1169,15 +1143,8 @@ H5C_mark_entries_as_clean(H5F_t * f,
entry_ptr = entry_ptr->prev;
entries_cleared++;
if ( H5C__flush_single_entry(f,
dxpl_id,
clear_ptr->addr,
H5C__FLUSH_CLEAR_ONLY_FLAG,
TRUE,
NULL) < 0 ) {
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
}
} else {
entry_ptr = entry_ptr->prev;
@ -1204,15 +1171,8 @@ H5C_mark_entries_as_clean(H5F_t * f,
entry_ptr = entry_ptr->next;
entries_cleared++;
if ( H5C__flush_single_entry(f,
dxpl_id,
clear_ptr->addr,
H5C__FLUSH_CLEAR_ONLY_FLAG,
TRUE,
NULL) < 0 ) {
if(H5C__flush_single_entry(f, dxpl_id, clear_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0 )
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't clear entry.")
}
} else {
entry_ptr = entry_ptr->next;

View File

@ -3770,8 +3770,7 @@ struct H5C_t {
/* Package Private Prototypes */
/******************************/
H5_DLL herr_t H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id,
haddr_t addr, unsigned flags, hbool_t del_entry_from_slist_on_destroy,
int64_t *entry_size_change_ptr);
H5C_cache_entry_t *entry_ptr, unsigned flags, int64_t *entry_size_change_ptr);
#endif /* _H5Cpkg_H */

View File

@ -236,6 +236,7 @@
* H5C__FLUSH_CLEAR_ONLY_FLAG
* H5C__FLUSH_MARKED_ENTRIES_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
* H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG
*/
#define H5C__NO_FLAGS_SET 0x0000
#define H5C__SET_FLUSH_MARKER_FLAG 0x0001
@ -252,6 +253,7 @@
#define H5C__TAKE_OWNERSHIP_FLAG 0x1000
#define H5C__FLUSH_LAST_FLAG 0x2000
#define H5C__FLUSH_COLLECTIVELY_FLAG 0x4000
#define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x8000
/****************************/

View File

@ -470,7 +470,7 @@ H5F__cache_superblock_image_len(const void *_thing, size_t *image_len, hbool_t *
*image_len = (size_t)H5F_SUPERBLOCK_SIZE(sblock);
/* Set *compressed_ptr to FALSE unconditionally */
*compressed_ptr;
*compressed_ptr = FALSE;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5F__cache_superblock_image_len() */

View File

@ -34878,8 +34878,8 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
if ( ( cache_ptr->total_ht_insertions != 33 ) ||
( cache_ptr->total_ht_deletions != 1 ) ||
( cache_ptr->successful_ht_searches != 65 ) ||
( cache_ptr->total_successful_ht_search_depth != 195 ) ||
( cache_ptr->successful_ht_searches != 32 ) ||
( cache_ptr->total_successful_ht_search_depth != 96 ) ||
( cache_ptr->failed_ht_searches != 33 ) ||
( cache_ptr->total_failed_ht_search_depth != 52 ) ||
( cache_ptr->max_index_len != 32 ) ||
@ -34989,8 +34989,8 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
if ( ( cache_ptr->total_ht_insertions != 33 ) ||
( cache_ptr->total_ht_deletions != 33 ) ||
( cache_ptr->successful_ht_searches != 98 ) ||
( cache_ptr->total_successful_ht_search_depth != 198 ) ||
( cache_ptr->successful_ht_searches != 33 ) ||
( cache_ptr->total_successful_ht_search_depth != 99 ) ||
( cache_ptr->failed_ht_searches != 33 ) ||
( cache_ptr->total_failed_ht_search_depth != 52 ) ||
( cache_ptr->max_index_len != 32 ) ||