mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r14065] Second try at checking in the "cork the cache" modification.
First attempt contained slightly dated versions of the files listed below. Must also note that the mods were tested with h5committest, and two other linux builds.
This commit is contained in:
parent
b742150e4c
commit
c5cdb7d957
33
src/H5AC.c
33
src/H5AC.c
@ -2040,7 +2040,7 @@ H5AC_resize_pinned_entry(H5F_t * f,
|
||||
( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0 ) &&
|
||||
( trace_file_ptr != NULL ) ) {
|
||||
|
||||
sprintf(trace, "H5AC_resize_pinned_entry 0x%lx %d %d",
|
||||
sprintf(trace, "H5AC_resize_pinned_entry 0x%lx %d",
|
||||
(unsigned long)(((H5C_cache_entry_t *)thing)->addr),
|
||||
(int)new_size);
|
||||
}
|
||||
@ -2611,7 +2611,6 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
|
||||
config_ptr->open_trace_file = FALSE;
|
||||
config_ptr->close_trace_file = FALSE;
|
||||
config_ptr->trace_file_name[0] = '\0';
|
||||
config_ptr->set_evictions_enabled = FALSE;
|
||||
config_ptr->evictions_enabled = evictions_enabled;
|
||||
config_ptr->set_initial_size = internal_config.set_initial_size;
|
||||
config_ptr->initial_size = internal_config.initial_size;
|
||||
@ -2827,7 +2826,6 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
|
||||
/* const char * fcn_name = "H5AC_set_cache_auto_resize_config"; */
|
||||
herr_t result;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
int name_len;
|
||||
H5C_auto_size_ctl_t internal_config;
|
||||
#if H5AC__TRACE_FILE_ENABLED
|
||||
H5AC_cache_config_t trace_config = H5AC__DEFAULT_CACHE_CONFIG;
|
||||
@ -2941,16 +2939,14 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
|
||||
"H5C_set_cache_auto_resize_config() failed.")
|
||||
}
|
||||
|
||||
if ( config_ptr->set_evictions_enabled ) {
|
||||
|
||||
result = H5C_set_evictions_enabled((H5C_t *)cache_ptr,
|
||||
config_ptr->evictions_enabled);
|
||||
result = H5C_set_evictions_enabled((H5C_t *)cache_ptr,
|
||||
config_ptr->evictions_enabled);
|
||||
|
||||
if ( result < 0 ) {
|
||||
if ( result < 0 ) {
|
||||
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
|
||||
"H5C_set_evictions_enabled() failed.")
|
||||
}
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
|
||||
"H5C_set_evictions_enabled() failed.")
|
||||
}
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
@ -2973,14 +2969,13 @@ done:
|
||||
( trace_file_ptr != NULL ) ) {
|
||||
|
||||
HDfprintf(trace_file_ptr,
|
||||
"%s %d %d %d %d \"%s\" %d %d %d %d %f %d %d %ld %d %f %f %d %d %d %f %f %d %d %d %d %f %d %d\n",
|
||||
"%s %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %d %d %f %f %d %d %d %d %f %d %d\n",
|
||||
"H5AC_set_cache_auto_resize_config",
|
||||
trace_config.version,
|
||||
(int)(trace_config.rpt_fcn_enabled),
|
||||
(int)(trace_config.open_trace_file),
|
||||
(int)(trace_config.close_trace_file),
|
||||
trace_config.trace_file_name,
|
||||
(int)(trace_config.set_evictions_enabled),
|
||||
(int)(trace_config.evictions_enabled),
|
||||
(int)(trace_config.set_initial_size),
|
||||
(int)(trace_config.initial_size),
|
||||
@ -3041,8 +3036,8 @@ done:
|
||||
*
|
||||
* - Added code testing the evictions enabled field. At
|
||||
* present this consists of verifying that if
|
||||
* set_evictions_enabled is TRUE and evictions_enabled
|
||||
* is FALSE, then automatic cache resizing in disabled.
|
||||
* evictions_enabled is FALSE, then automatic cache
|
||||
* resizing in disabled.
|
||||
*
|
||||
* JRM - 7/28/07
|
||||
*
|
||||
@ -3112,13 +3107,6 @@ H5AC_validate_config(H5AC_cache_config_t * config_ptr)
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( config_ptr->set_evictions_enabled != TRUE ) &&
|
||||
( config_ptr->set_evictions_enabled != FALSE ) ) {
|
||||
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
|
||||
"config_ptr->set_evictions_enabled must be either TRUE or FALSE.")
|
||||
}
|
||||
|
||||
if ( ( config_ptr->evictions_enabled != TRUE ) &&
|
||||
( config_ptr->evictions_enabled != FALSE ) ) {
|
||||
|
||||
@ -3126,8 +3114,7 @@ H5AC_validate_config(H5AC_cache_config_t * config_ptr)
|
||||
"config_ptr->evictions_enabled must be either TRUE or FALSE.")
|
||||
}
|
||||
|
||||
if ( ( config_ptr->set_evictions_enabled == TRUE ) &&
|
||||
( config_ptr->evictions_enabled == FALSE ) &&
|
||||
if ( ( config_ptr->evictions_enabled == FALSE ) &&
|
||||
( ( config_ptr->incr_mode != H5C_incr__off ) ||
|
||||
( config_ptr->incr_mode != H5C_decr__off ) ) ) {
|
||||
|
||||
|
@ -201,7 +201,6 @@ extern hid_t H5AC_ind_dxpl_id;
|
||||
/* hbool_t open_trace_file = */ FALSE, \
|
||||
/* hbool_t close_trace_file = */ FALSE, \
|
||||
/* char trace_file_name[] = */ "", \
|
||||
/* hbool_t set_evictions_enabled = */ FALSE, \
|
||||
/* hbool_t evictions_enabled = */ TRUE, \
|
||||
/* hbool_t set_initial_size = */ TRUE, \
|
||||
/* size_t initial_size = */ ( 1 * 1024 * 1024), \
|
||||
|
@ -107,14 +107,9 @@ extern "C" {
|
||||
* The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN
|
||||
* characters.
|
||||
*
|
||||
* set_evictions_enabled: Boolean flag indicating whether the cache
|
||||
* evictions_enabled flag is to be set to the value specified
|
||||
* in the evictions_enabled field below.
|
||||
*
|
||||
* evictions_enabled: Boolean field used to either report the current
|
||||
* evictions enabled status of the cache, or, when
|
||||
* set_evictions_enabled is TRUE, to set the cache's evictions
|
||||
* enabled status.
|
||||
* evictions enabled status of the cache, or to set the cache's
|
||||
* evictions enabled status.
|
||||
*
|
||||
* In general, the metadata cache should always be allowed to
|
||||
* evict entries. However, in some cases it is advantageous to
|
||||
@ -346,7 +341,6 @@ typedef struct H5AC_cache_config_t
|
||||
hbool_t close_trace_file;
|
||||
char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1];
|
||||
|
||||
hbool_t set_evictions_enabled;
|
||||
hbool_t evictions_enabled;
|
||||
|
||||
hbool_t set_initial_size;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "H5Fprivate.h" /* File access */
|
||||
|
||||
|
||||
#define H5C_DO_SANITY_CHECKS 1
|
||||
#define H5C_DO_SANITY_CHECKS 0
|
||||
#define H5C_DO_EXTREME_SANITY_CHECKS 0
|
||||
|
||||
/* This sanity checking constant was picked out of the air. Increase
|
||||
@ -51,7 +51,7 @@
|
||||
/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics
|
||||
* on cache activity. In general, this #define should be set to 0.
|
||||
*/
|
||||
#define H5C_COLLECT_CACHE_STATS 1
|
||||
#define H5C_COLLECT_CACHE_STATS 0
|
||||
|
||||
/* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics
|
||||
* in individual cache entries.
|
||||
|
Loading…
Reference in New Issue
Block a user