diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-04 02:18:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-04 02:18:26 (GMT) |
commit | d7d8c2ef5b15735f78aa5a9ec1173bf0fa28a3fe (patch) | |
tree | 3bd37c711868217dbb25c83784c68f22e41f991b | |
parent | 07171aa96fbc259de340c0f2ef12b76be29fbc2a (diff) | |
download | hdf5-d7d8c2ef5b15735f78aa5a9ec1173bf0fa28a3fe.zip hdf5-d7d8c2ef5b15735f78aa5a9ec1173bf0fa28a3fe.tar.gz hdf5-d7d8c2ef5b15735f78aa5a9ec1173bf0fa28a3fe.tar.bz2 |
[svn-r5518] Purpose:
Bug Fix
Description:
The "dirty" flag for symbol table entries and symbol table nodes was not
being cleared when they were flushed to the file, causing lots of extra
metadata I/O.
Solution:
Reset the symbol table entry & nodes' flags when thy are flushed to disk.
This reduces the number of I/O operations which hit the disk for my test
program from 83 to 53 (i.e. from 393 to 53, overall).
Platforms tested:
Solaris 2.7 (arabica) w/FORTRAN & FreeBSD 4.5 (sleipnir) w/C++
-rw-r--r-- | release_docs/RELEASE.txt | 2 | ||||
-rw-r--r-- | src/H5Gnode.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index f239cb6..3320884 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -88,6 +88,8 @@ New Features Bug Fixes since HDF5-1.4.3 Release ================================== + * Clear symbol table node "dirty" flag when flushing symbol tables to + disk, to reduce I/O calls made & improve performance. QAK - 2002/06/03 * Fixed bug where an object's header could get corrupted in certain obscure situations where many objects were created in the file. QAK - 2002/05/31 diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 6557087..fb8f20f 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -335,7 +335,13 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5G_node_t *sym) * Look for dirty entries and set the node dirty flag. */ for (i=0; i<sym->nsyms; i++) { - if (sym->entry[i].dirty) sym->dirty = TRUE; + if (sym->entry[i].dirty) { + /* Set the node's dirty flag */ + sym->dirty = TRUE; + + /* Reset the entry's dirty flag */ + sym->entry[i].dirty=FALSE; + } /* end if */ } /* @@ -373,7 +379,11 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5G_node_t *sym) "unable to write symbol table node to the file"); if (buf) H5FL_BLK_FREE(symbol_node,buf); + + /* Reset the node's dirty flag */ + sym->dirty = FALSE; } + /* * Destroy the symbol node? This might happen if the node is being * preempted from the cache. |