[svn-r27199] Description:

Large code cleanups and optimizations, in preparation for the upcoming
v3 metadata cache merge.

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-12 22:40:33 -05:00
parent e29904660a
commit 65e76690fd
8 changed files with 1210 additions and 2166 deletions

3051
src/H5AC.c

File diff suppressed because it is too large Load Diff

View File

@ -297,11 +297,6 @@
* To reitterate, this field is only used on process 0 -- it
* should be NULL on all other processes.
*
* d_slist_len: Integer field containing the number of entries in the
* dirty entry list. This field should always contain the
* value 0 on all processes other than process 0. It exists
* primarily for sanity checking.
*
* c_slist_ptr: Pointer to an instance of H5SL_t used to maintain a list
* of entries that were dirty, have been flushed
* to disk since the last clean entries broadcast, and are
@ -312,11 +307,6 @@
* the next clean entries broadcast. The list emptied after
* each broadcast.
*
* c_slist_len: Integer field containing the number of entries in the clean
* entries list (*c_slist_ptr). This field should always
* contain the value 0 on all processes other than process 0.
* It exists primarily for sanity checking.
*
* The following two fields are used only when metadata_write_strategy
* is H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
*
@ -325,9 +315,6 @@
* point. This list is then broadcast to the other processes,
* which then either flush or mark clean all entries on it.
*
* candidate_slist_len: Integer field containing the number of entries on the
* candidate list. It exists primarily for sanity checking.
*
* write_done: In the parallel test bed, it is necessary to ensure that
* all writes to the server process from cache 0 complete
* before it enters the barrier call with the other caches.
@ -394,16 +381,10 @@ typedef struct H5AC_aux_t
H5SL_t * d_slist_ptr;
int32_t d_slist_len;
H5SL_t * c_slist_ptr;
int32_t c_slist_len;
H5SL_t * candidate_slist_ptr;
int32_t candidate_slist_len;
void (* write_done)(void);
void (* sync_point_done)(int num_writes,

View File

@ -363,8 +363,6 @@ H5_DLL herr_t H5AC_set_sync_point_done_callback(H5C_t *cache_ptr,
void (*sync_point_done)(int num_writes, haddr_t *written_entries_tbl));
H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr,
void (* write_done)(void));
H5_DLL herr_t H5AC_stats(const H5F_t *f);
H5_DLL herr_t H5AC_dump_cache(const H5F_t *f);
H5_DLL herr_t H5AC_get_cache_auto_resize_config(const H5AC_t * cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_get_cache_size(H5AC_t *cache_ptr, size_t *max_size_ptr,
@ -374,27 +372,24 @@ H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t *cache_ptr);
H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_close_trace_file(H5AC_t *cache_ptr);
H5_DLL herr_t H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name);
H5_DLL herr_t H5AC_tag(hid_t dxpl_id, haddr_t metadata_tag, haddr_t * prev_tag);
H5_DLL herr_t H5AC_retag_copied_metadata(H5F_t * f, haddr_t metadata_tag);
H5_DLL herr_t H5AC_ignore_tags(H5F_t * f);
H5_DLL herr_t H5AC_tag(hid_t dxpl_id, haddr_t metadata_tag, haddr_t *prev_tag);
H5_DLL herr_t H5AC_retag_copied_metadata(const H5F_t *f, haddr_t metadata_tag);
H5_DLL herr_t H5AC_ignore_tags(const H5F_t *f);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr);
#endif /* H5_HAVE_PARALLEL */
#ifndef NDEBUG /* debugging functions */
H5_DLL herr_t H5AC_stats(const H5F_t *f);
H5_DLL herr_t H5AC_dump_cache(const H5F_t *f);
H5_DLL herr_t H5AC_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr,
void ** entry_ptr_ptr);
void ** entry_ptr_ptr);
H5_DLL herr_t H5AC_verify_entry_type(const H5F_t * f, haddr_t addr,
const H5AC_class_t * expected_type,
hbool_t * in_cache_ptr,
hbool_t * type_ok_ptr);
const H5AC_class_t * expected_type, hbool_t * in_cache_ptr,
hbool_t * type_ok_ptr);
#endif /* NDEBUG */ /* end debugging functions */
#endif /* !_H5ACprivate_H */

View File

@ -2127,9 +2127,7 @@ H5C_flush_to_min_clean(H5F_t * f,
if ( cache_ptr->check_write_permitted != NULL ) {
result = (cache_ptr->check_write_permitted)(f,
primary_dxpl_id,
&write_permitted);
result = (cache_ptr->check_write_permitted)(f, &write_permitted);
if ( result < 0 ) {
@ -2569,25 +2567,23 @@ done:
* file logging is turned off), or contain a pointer to the
* open file to which trace file data is to be written.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-NULL trace file pointer (can't fail)
*
* Programmer: John Mainzer
* 1/20/06
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
FILE *
H5C_get_trace_file_ptr(const H5C_t *cache_ptr)
{
FUNC_ENTER_NOAPI_NOERR
/* Check arguments */
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(trace_file_ptr_ptr);
*trace_file_ptr_ptr = cache_ptr->trace_file_ptr;
FUNC_LEAVE_NOAPI(SUCCEED)
FUNC_LEAVE_NOAPI(cache_ptr->trace_file_ptr)
} /* H5C_get_trace_file_ptr() */
@ -2600,16 +2596,15 @@ H5C_get_trace_file_ptr(const H5C_t *cache_ptr, FILE **trace_file_ptr_ptr)
* file logging is turned off), or contain a pointer to the
* open file to which trace file data is to be written.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-NULL trace file pointer (can't fail)
*
* Programmer: Quincey Koziol
* 6/9/08
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
FILE **trace_file_ptr_ptr)
FILE *
H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr)
{
FUNC_ENTER_NOAPI_NOERR
@ -2617,9 +2612,7 @@ H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
HDassert(entry_ptr);
HDassert(entry_ptr->cache_ptr);
H5C_get_trace_file_ptr(entry_ptr->cache_ptr, trace_file_ptr_ptr);
FUNC_LEAVE_NOAPI(SUCCEED)
FUNC_LEAVE_NOAPI(H5C_get_trace_file_ptr(entry_ptr->cache_ptr))
} /* H5C_get_trace_file_ptr_from_entry() */
@ -2820,9 +2813,7 @@ H5C_insert_entry(H5F_t * f,
if ( cache_ptr->check_write_permitted != NULL ) {
result = (cache_ptr->check_write_permitted)(f,
primary_dxpl_id,
&write_permitted);
result = (cache_ptr->check_write_permitted)(f, &write_permitted);
if ( result < 0 ) {
@ -3934,9 +3925,7 @@ H5C_protect(H5F_t * f,
if ( cache_ptr->check_write_permitted != NULL ) {
result = (cache_ptr->check_write_permitted)(f,
primary_dxpl_id,
&write_permitted);
result = (cache_ptr->check_write_permitted)(f, &write_permitted);
if ( result < 0 ) {
@ -4083,9 +4072,7 @@ H5C_protect(H5F_t * f,
if ( cache_ptr->check_write_permitted != NULL ) {
result = (cache_ptr->check_write_permitted)(f,
primary_dxpl_id,
&write_permitted);
result = (cache_ptr->check_write_permitted)(f, &write_permitted);
if ( result < 0 ) {
@ -8611,8 +8598,7 @@ H5C_flush_single_entry(H5F_t * f,
if ( cache_ptr->log_flush ) {
status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty,
flags, type_id);
status = (cache_ptr->log_flush)(cache_ptr, addr, was_dirty, flags);
if ( status < 0 ) {

View File

@ -170,14 +170,12 @@ typedef struct H5C_class_t {
/* Type defintions of call back functions used by the cache as a whole */
typedef herr_t (*H5C_write_permitted_func_t)(const H5F_t *f,
hid_t dxpl_id,
hbool_t * write_permitted_ptr);
typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
haddr_t addr,
hbool_t was_dirty,
unsigned flags,
int type_id);
unsigned flags);
/* Upper and lower limits on cache size. These limits are picked
* out of a hat -- you should be able to change them as necessary.
@ -1142,10 +1140,8 @@ H5_DLL herr_t H5C_get_entry_status(const H5F_t *f,
H5_DLL herr_t H5C_get_evictions_enabled(const H5C_t * cache_ptr,
hbool_t * evictions_enabled_ptr);
H5_DLL herr_t H5C_get_trace_file_ptr(const H5C_t *cache_ptr,
FILE **trace_file_ptr_ptr);
H5_DLL herr_t H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr,
FILE **trace_file_ptr_ptr);
H5_DLL FILE *H5C_get_trace_file_ptr(const H5C_t *cache_ptr);
H5_DLL FILE *H5C_get_trace_file_ptr_from_entry(const H5C_cache_entry_t *entry_ptr);
H5_DLL herr_t H5C_insert_entry(H5F_t * f,
hid_t primary_dxpl_id,

View File

@ -1526,6 +1526,8 @@ mdc_api_call_smoke_check(int express_test)
/* The following array of invalid external MDC cache configurations is
* used to test error rejection in the MDC related API calls.
*
* Note: It is assumed that boolean parameters are only set to TRUE/FALSE.
*/
#define NUM_INVALID_CONFIGS 42
@ -1568,112 +1570,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 1 -- bad rpt_fcn_enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ (hbool_t)-1,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ FALSE,
/* char trace_file_name[] = */ "",
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.25f,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ ( 1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
/* double increment = */ 2.0f,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999f,
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1f,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 2 -- bad open_trace_file */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ (hbool_t)-1,
/* hbool_t close_trace_file = */ FALSE,
/* char trace_file_name[] = */ "",
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.25f,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ ( 1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
/* double increment = */ 2.0f,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999f,
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1f,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 3 -- bad close_trace_file */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ (hbool_t)-1,
/* char trace_file_name[] = */ "",
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.25f,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ ( 1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
/* double increment = */ 2.0f,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999f,
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1f,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 4 -- open_trace_file == TRUE and empty trace_file_name */
/* 1 -- open_trace_file == TRUE and empty trace_file_name */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ TRUE,
@ -1708,7 +1605,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 5 -- bad set_initial_size */
/* 2 -- bad set_initial_size */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1743,7 +1640,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 6 -- max_size too big */
/* 3 -- max_size too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1778,7 +1675,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 7 -- min_size too small */
/* 4 -- min_size too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1813,7 +1710,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 8 -- min_size > max_size */
/* 5 -- min_size > max_size */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1848,7 +1745,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 9 -- initial size out of range (too big) */
/* 6 -- initial size out of range (too big) */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1883,7 +1780,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 10 -- initial_size out of range (too small) */
/* 7 -- initial_size out of range (too small) */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1918,7 +1815,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 11 -- min_clean_fraction too big */
/* 8 -- min_clean_fraction too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1953,7 +1850,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 12 -- min_clean_fraction too small */
/* 9 -- min_clean_fraction too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1988,7 +1885,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 13 -- epoch_length too small */
/* 10 -- epoch_length too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2023,7 +1920,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 14 -- epoch_length too big */
/* 11 -- epoch_length too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2058,7 +1955,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 15 -- invalid incr_mode */
/* 12 -- invalid incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2093,7 +1990,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 16 -- lower_hr_threshold too small */
/* 13 -- lower_hr_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2128,7 +2025,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 17 -- lower_hr_threshold too big */
/* 14 -- lower_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2163,7 +2060,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 18 -- increment too small */
/* 15 -- increment too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2198,42 +2095,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 19 -- bad apply_max_increment */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ FALSE,
/* char trace_file_name[] = */ "",
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.25f,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ ( 1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
/* double increment = */ 2.0f,
/* hbool_t apply_max_increment = */ (hbool_t)-1,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999f,
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1f,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 20 -- invalid flash_incr_mode */
/* 16 -- invalid flash_incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2268,7 +2130,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 21 -- flash_multiple too small */
/* 17 -- flash_multiple too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2303,7 +2165,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 22 -- flash_multiple too big */
/* 18 -- flash_multiple too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2338,7 +2200,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 23 -- flash_threshold too small */
/* 19 -- flash_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2373,7 +2235,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 24 -- flash_threshold too big */
/* 20 -- flash_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2408,7 +2270,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 25 -- bad decr_mode */
/* 21 -- bad decr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2443,7 +2305,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 26 -- upper_hr_threshold too big */
/* 22 -- upper_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2478,7 +2340,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 27 -- decrement too small */
/* 23 -- decrement too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2513,7 +2375,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 28 -- decrement too big */
/* 24 -- decrement too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2548,7 +2410,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 29 -- epochs_before_eviction too small */
/* 25 -- epochs_before_eviction too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2583,7 +2445,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 30 -- epochs_before_eviction too big */
/* 26 -- epochs_before_eviction too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2618,7 +2480,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 31 -- invalid apply_empty_reserve */
/* 27 -- invalid apply_empty_reserve */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2653,7 +2515,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 32 -- empty_reserve too small */
/* 28 -- empty_reserve too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2688,7 +2550,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 33 -- empty_reserve too big */
/* 29 -- empty_reserve too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2723,7 +2585,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 34 -- upper_hr_threshold too small */
/* 30 -- upper_hr_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2758,7 +2620,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 35 -- upper_hr_threshold too big */
/* 31 -- upper_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2793,7 +2655,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 36 -- upper_hr_threshold <= lower_hr_threshold */
/* 32 -- upper_hr_threshold <= lower_hr_threshold */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2828,7 +2690,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 37 -- dirty_bytes_threshold too small */
/* 33 -- dirty_bytes_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2863,7 +2725,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 38 -- dirty_bytes_threshold too big */
/* 34 -- dirty_bytes_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2898,7 +2760,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 39 -- attempt to disable evictions when auto incr enabled */
/* 35 -- attempt to disable evictions when auto incr enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2933,7 +2795,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 40 -- attempt to disable evictions when auto decr enabled */
/* 36 -- attempt to disable evictions when auto decr enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2968,7 +2830,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 41 -- unknown metadata write strategy */
/* 37 -- unknown metadata write strategy */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,

View File

@ -475,18 +475,14 @@ addr_to_type_and_index(haddr_t addr,
*
*-------------------------------------------------------------------------
*/
herr_t
check_write_permitted(const H5F_t H5_ATTR_UNUSED *f,
hid_t H5_ATTR_UNUSED dxpl_id,
hbool_t *write_permitted_ptr)
static herr_t
check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr)
{
HDassert(write_permitted_ptr);
HDassert( write_permitted_ptr );
*write_permitted_ptr = write_permitted;
return(SUCCEED);
} /* check_write_permitted() */

View File

@ -532,13 +532,6 @@ extern const haddr_t base_addrs[NUMBER_OF_ENTRY_TYPES];
extern const haddr_t alt_base_addrs[NUMBER_OF_ENTRY_TYPES];
extern const char * entry_type_names[NUMBER_OF_ENTRY_TYPES];
/* call back function declarations: */
herr_t check_write_permitted(const H5F_t * f,
hid_t dxpl_id,
hbool_t * write_permitted_ptr);
/* callback table extern */
extern const H5C_class_t types[NUMBER_OF_ENTRY_TYPES];