diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-28 21:39:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-28 21:39:09 (GMT) |
commit | b8f809981bb6c378e2a942aad551620feaa47125 (patch) | |
tree | 0cc2f0cae57278923512b9419f9fbdb71f4dd56c /src/H5Cprivate.h | |
parent | 280907a9bf78cdda0a8c8ce7a290e8bc631a894c (diff) | |
download | hdf5-b8f809981bb6c378e2a942aad551620feaa47125.zip hdf5-b8f809981bb6c378e2a942aad551620feaa47125.tar.gz hdf5-b8f809981bb6c378e2a942aad551620feaa47125.tar.bz2 |
[svn-r30112] Description:
Move updated flush dependency code in metadata cache from revise_chunks
branch to trunk. Also many of the cleanups from r30111 in the revise_chunks
branch.
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'src/H5Cprivate.h')
-rw-r--r-- | src/H5Cprivate.h | 55 |
1 files changed, 19 insertions, 36 deletions
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 066977f..975ea3e 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -97,14 +97,6 @@ #define H5C__DEFAULT_MAX_CACHE_SIZE ((size_t)(4 * 1024 * 1024)) #define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024)) -/* Maximum height of flush dependency relationships between entries. This is - * currently tuned to the extensible array (H5EA) data structure, which only - * requires 6 levels of dependency (i.e. heights 0-6) (actually, the extensible - * array needs 4 levels, plus another 2 levels are needed: one for the layer - * under the extensible array and one for the layer above it). - */ -#define H5C__NUM_FLUSH_DEP_HEIGHTS 6 - /* Values for cache entry magic field */ #define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A #define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef @@ -209,6 +201,7 @@ #define H5C__TAKE_OWNERSHIP_FLAG 0x0800 #define H5C__FLUSH_LAST_FLAG 0x1000 #define H5C__FLUSH_COLLECTIVELY_FLAG 0x2000 +#define H5C__EVICT_ALLOW_LAST_PINS_FLAG 0x4000 #define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x8000 /* Definitions for cache "tag" property */ @@ -1473,33 +1466,29 @@ typedef int H5C_ring_t; * * Fields supporting the 'flush dependency' feature: * - * Entries in the cache may have a 'flush dependency' on another entry in the + * Entries in the cache may have 'flush dependencies' on other entries in the * cache. A flush dependency requires that all dirty child entries be flushed * to the file before a dirty parent entry (of those child entries) can be * flushed to the file. This can be used by cache clients to create data * structures that allow Single-Writer/Multiple-Reader (SWMR) access for the * data structure. * - * The leaf child entry will have a "height" of 0, with any parent entries - * having a height of 1 greater than the maximum height of any of their child - * entries (flush dependencies are allowed to create asymmetric trees of - * relationships). - * - * flush_dep_parent: Pointer to the parent entry for an entry in a flush - * dependency relationship. + * flush_dep_parent: Pointer to the array of flush dependency parent entries + * for this entry. * - * child_flush_dep_height_rc: An array of reference counts for child entries, - * where the number of children of each height is tracked. + * flush_dep_nparents: Number of flush dependency parent entries for this + * entry, i.e. the number of valid elements in flush_dep_parent. * - * flush_dep_height: The height of the entry, which is one greater than the - * maximum height of any of its child entries.. + * flush_dep_parent_nalloc: The number of allocated elements in + * flush_dep_parent_nalloc. * - * pinned_from_client: Whether the entry was pinned by an explicit pin request - * from a cache client. + * flush_dep_nchildren: Number of flush dependency children for this entry. If + * this field is nonzero, then this entry must be pinned and + * therefore cannot be evicted. * - * pinned_from_cache: Whether the entry was pinned implicitly as a - * request of being a parent entry in a flush dependency - * relationship. + * flush_dep_ndirty_children: Number of flush dependency children that are + * either dirty or have a nonzero flush_dep_ndirty_children. If + * this field is nonzero, then this entry cannot be flushed. * * * Fields supporting the hash table: @@ -1644,9 +1633,11 @@ typedef struct H5C_cache_entry_t { H5C_ring_t ring; /* fields supporting the 'flush dependency' feature: */ - struct H5C_cache_entry_t * flush_dep_parent; - uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS]; - unsigned flush_dep_height; + struct H5C_cache_entry_t ** flush_dep_parent; + unsigned flush_dep_nparents; + unsigned flush_dep_parent_nalloc; + unsigned flush_dep_nchildren; + unsigned flush_dep_ndirty_children; hbool_t pinned_from_client; hbool_t pinned_from_cache; @@ -2041,13 +2032,5 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, hid_t dxpl_id, int32_t ce_arra haddr_t *ce_array_ptr); #endif /* H5_HAVE_PARALLEL */ -#ifndef NDEBUG /* debugging functions */ -H5_DLL herr_t H5C_get_entry_ptr_from_addr(const H5F_t *f, haddr_t addr, - void **entry_ptr_ptr); -H5_DLL herr_t H5C_verify_entry_type(const H5F_t *f, haddr_t addr, - const H5C_class_t *expected_type, hbool_t *in_cache_ptr, - hbool_t *type_ok_ptr); -#endif /* NDEBUG */ - #endif /* !_H5Cprivate_H */ |