GPFS attempts to recognize the pattern of accesses that an application makes to an open file, and optimizes its behavior accordingly. For example, GPFS can recognize sequential reads and therefore prefetch blocks in advance of when they are required by the application. However, in many cases GPFS does not recognize the access pattern of the application, or cannot optimize its data transfers. In these situations, performance may improve if the application explicitly discloses aspects of its access pattern to GPFS via the gpfs_fcntl( ) library call. These calls are exploited by MPI Version 2.0.
The gpfs_fcntl( ) library call allows application programs to pass two classes of file access information giving GPFS an opportunity to improve throughput and latency of file system requests:
Hints allow an application to disclose its future accesses to GPFS. Hints are always optional. Adding or removing hints from a program, even incorrectly specified hints, will never alter the meaning of a program. Hints can only affect the performance of an application. The hints that may be passed to GPFS are:
In contrast, directives are stronger than hints. They may affect program semantics and must be either carried out by GPFS or return an error. The directives which may be passed to GPFS are:
To communicate hints and directives to GPFS, an application program builds a data structure in memory, then passes it to GPFS. This data structure consists of:
Hints and directives may be mixed within a single gpfs_fcntl( ) call and are performed in the order they appear. A subsequent hint or directive may cancel out a preceding one.
The header and hints and directives that follow it are defined as C structures.
The gpfs_fcntl( ) library call takes the handle of the opened file as its first parameter and the address of the data structure as its second parameter. For complete definitions of the gpfs_fcntl( ) library call, the header, hints, and directives, see gpfs_fcntl( ) Subroutine.