From 271e4e4663c25b121e900cf24cacbd8617f0a1dd Mon Sep 17 00:00:00 2001 From: John Mainzer Date: Wed, 23 Jan 2008 16:38:47 -0500 Subject: [svn-r14450] Fixed metadata cache performance bug introduced while adding code to detect and handle the case in which the skip list or LRU is modified out from under a scan of same by the flush callback of the entry under consideration. Test serial debug, serial production, and parallel debug on phoenix, and commit tested. --- src/H5C.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/H5C.c b/src/H5C.c index 3f7c9cc..35ab671 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -9234,10 +9234,6 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr, double hit_rate; FUNC_ENTER_NOAPI_NOINIT(H5C__flash_increase_cache_size) -#if 0 - HDfprintf(stdout, "%s: old = %ld, new = %ld.\n", fcn_name, - (long)old_entry_size, (long)new_entry_size); -#endif HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); HDassert( cache_ptr->flash_size_increase_possible ); @@ -10809,17 +10805,22 @@ H5C_make_space_in_cache(H5F_t * f, } else #endif /* NDEBUG */ - if ( ( prev_ptr->is_dirty != prev_is_dirty ) - || - ( prev_ptr->next != next_ptr ) - || - ( prev_ptr->is_protected ) - || - ( prev_ptr->is_pinned ) ) { + if ( (entry_ptr->type)->id == H5C__EPOCH_MARKER_TYPE ) { + + entry_ptr = prev_ptr; + + } else if ( ( prev_ptr->is_dirty != prev_is_dirty ) + || + ( prev_ptr->next != next_ptr ) + || + ( prev_ptr->is_protected ) + || + ( prev_ptr->is_pinned ) ) { /* something has happened to the LRU -- start over * from the tail. */ + entry_ptr = cache_ptr->LRU_tail_ptr; } else { -- cgit v0.12