diff options
author | John Mainzer <mainzer@hdfgroup.org> | 2008-10-03 06:50:54 (GMT) |
---|---|---|
committer | John Mainzer <mainzer@hdfgroup.org> | 2008-10-03 06:50:54 (GMT) |
commit | 648d6ac066ed4f75e168f7a4946fb62d0da6d400 (patch) | |
tree | dfe57c4556e6ced61264cdb00f731ac2edcbbb77 /test/cache2_journal.c | |
parent | d3f252466cddf196075b31c442fe1aed611b6ca8 (diff) | |
download | hdf5-648d6ac066ed4f75e168f7a4946fb62d0da6d400.zip hdf5-648d6ac066ed4f75e168f7a4946fb62d0da6d400.tar.gz hdf5-648d6ac066ed4f75e168f7a4946fb62d0da6d400.tar.bz2 |
[svn-r15763] Converted the fractal heap direct block cache client to use the
revised cache.
Note that this conversion is not as efficient as it should be. Specifically,
it does it more memcpy's between the metadata cache's on disk image of the
direct block and the fractal heap's on disk image of the direct block than
is absolutely essential. Eventually, we will want to fix this -- probably
by allowing the metadata cache and the fractal heap direct block to share
a common on disk image of the direct block. However, this will require
extensions to the client / metadata cache interface, and some reworking of
the fractal heap as well.
This checkin also includes Mike M's fix to the Linew specific bug mentioned
in my checkin of 22 Aug 2008.
Tested on Phoenix (serial debug and production),
Kagiso (parallel), and
Linew (serial)
Diffstat (limited to 'test/cache2_journal.c')
-rw-r--r-- | test/cache2_journal.c | 97 |
1 files changed, 63 insertions, 34 deletions
diff --git a/test/cache2_journal.c b/test/cache2_journal.c index 0f5d70d..1aaf58e 100644 --- a/test/cache2_journal.c +++ b/test/cache2_journal.c @@ -548,7 +548,8 @@ end_trans(H5F_t * file_ptr, if ( pass2 ) { - result = H5C2_end_transaction(file_ptr, cache_ptr, trans_num, trans_name); + result = H5C2_end_transaction(file_ptr, H5AC2_dxpl_id, cache_ptr, + trans_num, trans_name); if ( result < 0 ) { @@ -720,7 +721,7 @@ jrnl_col_major_scan_backward2(H5F_t * file_ptr, uint64_t trans_num) { const char * fcn_name = "jrnl_col_major_scan_backward2()"; - H5C2_t * cache_ptr = file_ptr->shared->cache2; + H5C2_t * cache_ptr; int i; int mile_stone = 1; int32_t type; @@ -730,19 +731,26 @@ jrnl_col_major_scan_backward2(H5F_t * file_ptr, if ( verbose ) HDfprintf(stdout, "%s: entering.\n", fcn_name); - for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ ) - { - local_max_index[i] = MIN(max_index, max_indices2[i]); - } + if ( pass2 ) { - HDassert( lag > 5 ); + cache_ptr = file_ptr->shared->cache2; - if ( ( pass2 ) && ( reset_stats ) ) { + HDassert( cache_ptr != NULL ); - H5C2_stats__reset(cache_ptr); - } + for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ ) + { + local_max_index[i] = MIN(max_index, max_indices2[i]); + } + + HDassert( lag > 5 ); - idx = local_max_index[NUMBER_OF_ENTRY_TYPES - 1] + lag; + if ( reset_stats ) { + + H5C2_stats__reset(cache_ptr); + } + + idx = local_max_index[NUMBER_OF_ENTRY_TYPES - 1] + lag; + } if ( verbose ) /* 1 */ HDfprintf(stdout, "%s: point %d.\n", fcn_name, mile_stone++); @@ -878,7 +886,7 @@ jrnl_col_major_scan_forward2(H5F_t * file_ptr, uint64_t trans_num) { const char * fcn_name = "jrnl_col_major_scan_forward2()"; - H5C2_t * cache_ptr = file_ptr->shared->cache2; + H5C2_t * cache_ptr; int i; int32_t type; int32_t idx; @@ -887,21 +895,28 @@ jrnl_col_major_scan_forward2(H5F_t * file_ptr, if ( verbose ) HDfprintf(stdout, "%s: entering.\n", fcn_name); - for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ ) - { - local_max_index[i] = MIN(max_index, max_indices2[i]); - } + if ( pass2 ) { - HDassert( lag > 5 ); + cache_ptr = file_ptr->shared->cache2; - type = 0; + HDassert( cache_ptr != NULL ); - if ( ( pass2 ) && ( reset_stats ) ) { + for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ ) + { + local_max_index[i] = MIN(max_index, max_indices2[i]); + } - H5C2_stats__reset(cache_ptr); - } + HDassert( lag > 5 ); - idx = -lag; + type = 0; + + if ( reset_stats ) { + + H5C2_stats__reset(cache_ptr); + } + + idx = -lag; + } while ( ( pass2 ) && ( (idx - lag) <= MAX_ENTRIES ) ) { @@ -1032,7 +1047,7 @@ jrnl_row_major_scan_backward2(H5F_t * file_ptr, uint64_t trans_num) { const char * fcn_name = "jrnl_row_major_scan_backward2"; - H5C2_t * cache_ptr = file_ptr->shared->cache2; + H5C2_t * cache_ptr; int32_t type; int32_t idx; int32_t local_max_index; @@ -1042,15 +1057,21 @@ jrnl_row_major_scan_backward2(H5F_t * file_ptr, if ( verbose ) HDfprintf(stdout, "%s(): Entering.\n", fcn_name); - HDassert( lag >= 10 ); + if ( pass2 ) { - type = NUMBER_OF_ENTRY_TYPES - 1; + cache_ptr = file_ptr->shared->cache2; - if ( ( pass2 ) && ( reset_stats ) ) { + HDassert( cache_ptr != NULL ); + HDassert( lag >= 10 ); - H5C2_stats__reset(cache_ptr); + if ( reset_stats ) { + + H5C2_stats__reset(cache_ptr); + } } + type = NUMBER_OF_ENTRY_TYPES - 1; + while ( ( pass2 ) && ( type >= 0 ) ) { local_max_index = MIN(max_index, max_indices2[type]); @@ -1459,7 +1480,7 @@ jrnl_row_major_scan_forward2(H5F_t * file_ptr, uint64_t trans_num) { const char * fcn_name = "jrnl_row_major_scan_forward2"; - H5C2_t * cache_ptr = file_ptr->shared->cache2; + H5C2_t * cache_ptr; int32_t type; int32_t idx; int32_t local_max_index; @@ -1469,13 +1490,19 @@ jrnl_row_major_scan_forward2(H5F_t * file_ptr, if ( verbose ) HDfprintf(stdout, "%s(): entering.\n", fcn_name); - HDassert( lag >= 10 ); + if ( pass2 ) { + + cache_ptr = file_ptr->shared->cache2; - type = 0; + HDassert( cache_ptr != NULL ); + HDassert( lag >= 10 ); - if ( ( pass2 ) && ( reset_stats ) ) { + type = 0; - H5C2_stats__reset(cache_ptr); + if ( reset_stats ) { + + H5C2_stats__reset(cache_ptr); + } } while ( ( pass2 ) && ( type < NUMBER_OF_ENTRY_TYPES ) ) @@ -6668,7 +6695,8 @@ verify_mdj_file_marking_on_create(void) * initialization. */ H5C2_begin_transaction(cache_ptr, &trans_num, "dummy"); - H5C2_end_transaction(file_ptr, cache_ptr, trans_num, "dummy"); + H5C2_end_transaction(file_ptr, H5AC2_dxpl_id, cache_ptr, + trans_num, "dummy"); if ( show_progress ) { @@ -8602,7 +8630,8 @@ verify_mdj_file_unmarking_on_recovery(void) * initialization. */ H5C2_begin_transaction(cache_ptr, &trans_num, "dummy"); - H5C2_end_transaction(file_ptr, cache_ptr, trans_num, "dummy"); + H5C2_end_transaction(file_ptr, H5AC2_dxpl_id, cache_ptr, + trans_num, "dummy"); if ( show_progress ) { |