Skip to content

Commit

Permalink
Merge pull request #424 from Pidad/FGRS
Browse files Browse the repository at this point in the history
aiori-POSIX: Spectrum Scale finegrainreadsharing performance updates
  • Loading branch information
JulianKunkel committed Jun 10, 2022
2 parents 07e2feb + 800d763 commit bfc30bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ AS_IF([test "$ac_cv_header_gpfs_h" = "yes" -o "$ac_cv_header_gpfs_fcntl_h" = "ye
[AC_MSG_ERROR([Library containing gpfs_fcntl symbols not found])
])
AC_CHECK_TYPES([gpfsFineGrainWriteSharing_t], [], [], [[#include <gpfs_fcntl.h>]])
AC_CHECK_TYPES([gpfsFineGrainReadSharing_t], [], [], [[#include <gpfs_fcntl.h>]])
])
])

Expand Down
9 changes: 9 additions & 0 deletions src/aiori-POSIX.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ void gpfs_fineGrainReadSharing(int fd)
struct
{
gpfsFcntlHeader_t header;
#ifdef HAVE_GPFSFINEGRAINREADSHARING_T
gpfsFineGrainReadSharing_t read;
#else
gpfsPrefetch_t read;
#endif
} sharingHint;
int rc;

Expand All @@ -331,9 +335,14 @@ void gpfs_fineGrainReadSharing(int fd)
sharingHint.header.fcntlReserved = 0;

sharingHint.read.structLen = sizeof(sharingHint.read);
#ifdef HAVE_GPFSFINEGRAINREADSHARING_T
sharingHint.read.structType = GPFS_FINE_GRAIN_READ_SHARING;
sharingHint.read.fineGrainReadSharing = 1;
#else
sharingHint.read.structType = GPFS_PREFETCH;
sharingHint.read.prefetchEnableRead = 0;
sharingHint.read.prefetchEnableWrite = 1;
#endif

rc = gpfs_fcntl(fd, &sharingHint);
if (verbose >= VERBOSE_2 && rc != 0) {
Expand Down

0 comments on commit bfc30bc

Please sign in to comment.