summaryrefslogtreecommitdiffstats
path: root/src/H5PB.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-12-02 06:17:15 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-12-02 06:17:15 (GMT)
commit49f45640f6b1a3f162027f22a0f00b6eb7f3f433 (patch)
treeefd0f1ec87de84e17969c0d079d1ffa32aab3a8c /src/H5PB.c
parentce2748f0114cb1eae00799f8349a5451152c7fa3 (diff)
downloadhdf5-49f45640f6b1a3f162027f22a0f00b6eb7f3f433.zip
hdf5-49f45640f6b1a3f162027f22a0f00b6eb7f3f433.tar.gz
hdf5-49f45640f6b1a3f162027f22a0f00b6eb7f3f433.tar.bz2
(1) Fix for accumulator issue #1 as described in John's previous checkin
(2) Test files for encoding/decoding property lists (3) Fix test failures for PB statistics in test/page_buffer.c (Will double check with John later about PB statistics collection)
Diffstat (limited to 'src/H5PB.c')
-rw-r--r--src/H5PB.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/H5PB.c b/src/H5PB.c
index dbee611..2df8837 100644
--- a/src/H5PB.c
+++ b/src/H5PB.c
@@ -57,7 +57,7 @@
* The following #define controls this. Set VFD_IO to FALSE to reproduce
* the bug.
*/
-#define VFD_IO TRUE
+#define VFD_IO FALSE
/******************/
@@ -1951,8 +1951,7 @@ H5PB__load_page(H5F_t *f, H5PB_t *pb_ptr, haddr_t addr, H5FD_mem_t type,
* written. Skip the read if addr > EOF. In this case, tell
* H5PB__create_new_page() to zero the page image.
*/
- skip_read = (addr >= eof);
-
+ /* Remove "skip_read = (addr >= eof);" when accumulator is used */
/* make space in the page buffer if necessary */
if ( ( pb_ptr->curr_pages >= pb_ptr->max_pages ) &&
@@ -2533,7 +2532,7 @@ H5PB__read_meta(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
if ( entry_ptr == NULL ) { /* case 7 */
/* update hit rate stats */
- H5PB__UPDATE_PB_HIT_RATE_STATS(pb_ptr, FALSE, TRUE, TRUE)
+ H5PB__UPDATE_PB_HIT_RATE_STATS(pb_ptr, FALSE, TRUE, size > pb_ptr->page_size)
/* If the read is for metadata, is page aligned, is larger
* than one page, and there is no entry in the page buffer,
@@ -2547,6 +2546,8 @@ H5PB__read_meta(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, \
"driver read request failed (1)")
+
+ H5PB__UPDATE_STATS_FOR_BYPASS(pb_ptr, type, size);
} else {
HDassert( entry_ptr );
@@ -2590,6 +2591,8 @@ H5PB__read_meta(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
HGOTO_ERROR(H5E_PAGEBUF, H5E_READERROR, FAIL, \
"driver read request failed (2)")
+
+ H5PB__UPDATE_STATS_FOR_BYPASS(pb_ptr, type, size);
} else {
HDassert( entry_ptr->image_ptr );
@@ -2609,7 +2612,7 @@ H5PB__read_meta(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
}
/* update hit rate stats */
- H5PB__UPDATE_PB_HIT_RATE_STATS(pb_ptr, TRUE, TRUE, TRUE)
+ H5PB__UPDATE_PB_HIT_RATE_STATS(pb_ptr, TRUE, TRUE, FALSE)
}
} else { /* case 9 */
@@ -2814,6 +2817,9 @@ H5PB__read_raw(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
"read through metadata accumulator failed")
+ H5PB__UPDATE_STATS_FOR_BYPASS(pb_ptr, type, size);
+
+
/* For each page that intersects with the above read, check to see
* if it exists in the page buffer, and if so, if it is dirty.
*
@@ -3346,6 +3352,9 @@ H5PB__write_raw(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size,
HGOTO_ERROR(H5E_PAGEBUF, H5E_WRITEERROR, FAIL, \
"write through metadata accumulator failed")
+
+ H5PB__UPDATE_STATS_FOR_BYPASS(pb_ptr, type, size);
+
/* For each page that intersects with the above write, check to see
* if it exists in the page buffer.
*