From ad0bc2660401e7334e9bb8fe12d6946f655a5135 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 24 Oct 2000 13:17:24 -0500 Subject: [svn-r2721] Purpose: Feature symmetry Description: A while ago I needed to get the 'type' of data being accessed during writes to the VFL driver, so I put in code to get the information down there. Albert asked for the same information during reads, so I've added that in. Tested: Netscape --- doc/html/TechNotes/VFL.html | 87 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 13 deletions(-) diff --git a/doc/html/TechNotes/VFL.html b/doc/html/TechNotes/VFL.html index 5660b61..5674cdb 100644 --- a/doc/html/TechNotes/VFL.html +++ b/doc/html/TechNotes/VFL.html @@ -44,10 +44,11 @@
  • Contiguous I/O Functions
  • Flushing Cached Data -
  • Registration of a Driver -
  • Querying Driver Information +
  • Optimization Functions +
  • Registration of a Driver +
  • Querying Driver Information -
  • Miscellaneous +
  • Miscellaneous


    @@ -1058,9 +1059,9 @@ file and vice versa.

    -
    Function: static herr_t read (H5FD_t *file, hid_t dxpl, haddr_t addr, hsize_t size, void *buf) +
    Function: static herr_t read (H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, void *buf)
    -
    Function: static herr_t write (H5FD_t *file, hid_t dxpl, haddr_t addr, hsize_t size, const void *buf) +
    Function: static herr_t write (H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, const void *buf)

    @@ -1071,7 +1072,9 @@ supplied by the caller. The write function transfers data in the opposite direction. Both functions take a data transfer property list dxpl which indicates the fine points of how the data is to be transferred and which comes directly from the H5Dread or -H5Dwrite function. +H5Dwrite function. Both functions receive type of +data being written, which may allow a driver to tune it's behavior for +different kinds of data.

    @@ -1092,8 +1095,8 @@ system calls which were interrupted.
     static herr_t
    -H5FD_sec2_read(H5FD_t *_file, hid_t dxpl_id/*unused*/, haddr_t addr,
    -               hsize_t size, void *buf/*out*/)
    +H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type/*unused*/, hid_t dxpl_id/*unused*/,
    +        haddr_t addr, hsize_t size, void *buf/*out*/)
     {
         H5FD_sec2_t         *file = (H5FD_sec2_t*)_file;
         ssize_t             nbytes;
    @@ -1203,7 +1206,57 @@ H5FD_sec2_flush(H5FD_t *_file)
     
     
     
    -

    Registration of a Driver

    +

    Optimization Functions

    + +

    +The library is capable of performing several generic optimizations on I/O, but +these types of optimizations may not be appropriate for a given VFL driver. +

    + +

    +Each driver may provide a query function to allow the library to query whether +to enable these optimizations. If a driver lacks a query function, the library +will disable all types of optimizations which can be queried. +

    + +

    +

    +
    Function: static herr_t query (const H5FD_t *file, unsigned long *flags) +
    +

    +

    +This function is called by the library to query which optimizations to enable +for I/O to this driver. These are the flags which are currently defined: + +

      +
      +
      H5FD_FEAT_AGGREGATE_METADATA (0x00000001) +
      Defining the H5FD_FEAT_AGGREGATE_METADATA for a VFL driver means that +the library will attempt to allocate a larger block for metadata and +then sub-allocate each metadata request from that larger block. +
      H5FD_FEAT_ACCUMULATE_METADATA (0x00000002) +
      Defining the H5FD_FEAT_ACCUMULATE_METADATA for a VFL driver means that +the library will attempt to cache metadata as it is written to the file +and build up a larger block of metadata to eventually pass to the VFL +'write' routine. +
      H5FD_FEAT_DATA_SIEVE (0x00000004) +
      Defining the H5FD_FEAT_DATA_SIEVE for a VFL driver means that +the library will attempt to cache raw data as it is read from/written to +a file in a "data sieve" buffer. See Rajeev Thakur's papers: +
        +
        +
        http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps.gz +
        http://www.mcs.anl.gov/~thakur/papers/mpio-high-perf.ps.gz +
        +
      +
      +
    +

    + +
    +

    + +

    Registration of a Driver

    Before a driver can be used the HDF5 library needs to be told of its @@ -1275,6 +1328,10 @@ The function which ends access to a file. An optional function to determine whether two open files have the same key. If this function is not present then the library assumes that two files will never be the same. +

    int (*query)(const H5FD_t *f, unsigned long *flags) +
    +An optional function to determine which library optimizations a driver can +support.
    haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hsize_t size)
    An optional function to allocate space in the file. @@ -1290,10 +1347,10 @@ A function to set the end of address space.
    haddr_t (*get_eof)(H5FD_t *file)
    A function to return the current end-of-file marker value. -
    herr_t (*read)(H5FD_t *file, hid_t dxpl, haddr_t addr, hsize_t size, void *buffer) +
    herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, void *buffer)
    A function to read data from a file. -
    herr_t (*write)(H5FD_t *file, hid_t dxpl, haddr_t addr, hsize_t size, const void *buffer) +
    herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, const void *buffer)
    A function to write data to a file.
    herr_t (*flush)(H5FD_t *file) @@ -1326,6 +1383,7 @@ static const H5FD_class_t H5FD_sec2_g = { H5FD_sec2_open, /*open */ H5FD_sec2_close, /*close */ H5FD_sec2_cmp, /*cmp */ + H5FD_sec2_query, /*query */ NULL, /*alloc */ NULL, /*free */ H5FD_sec2_get_eoa, /*get_eoa */ @@ -1368,7 +1426,7 @@ already use that driver. -

    Querying Driver Information

    +

    Querying Driver Information

    @@ -1390,7 +1448,7 @@ driver-specific data transfer information instead.

    -

    Miscellaneous

    +

    Miscellaneous

    The various private H5F_low_* functions will be replaced by public @@ -1478,5 +1536,8 @@ in the missing parts of the mapping. This document was generated on 18 November 1999 using the texi2html translator version 1.51.

    +

    +Updated on 10/24/00 by hand, Quincey Koziol +

    -- cgit v0.12