CcSetReadAheadGranularityEx routine

The CcSetReadAheadGranularityEx routine sets the read-ahead granularity and enables pipelined read-ahead for a cached file.

Syntax

VOID CcSetReadAheadGranularityEx(
  _In_ PFILE_OBJECT FileObject,
  _In_ PREAD_AHEAD_PARAMETERS    ReadAheadParameters
);

Parameters

FileObject [in]
Pointer to a file object for the cached file whose read-ahead granularity is to be set.

ReadAheadParameters [in]
Specifies the read ahead parameters. See READ_AHEAD_PARAMETERS for more information.

Return value

None

Remarks

Calling CcSetReadAheadGranularityEx will enable pipelined read-ahead requests for the file object in FileObject. Selecting an appropriate value for PipelinedRequestSize will divide read-ahead requests into smaller multiple parallel requests. Callers of CcSetReadAheadGranularityEx can tune read-ahead performance by adjusting PipelinedRequestSize.

After CcInitializeCacheMap is called to cache a file, but before CcSetReadAheadGranularityEx is called for the cached file, the default read-ahead granularity for the cached file is equal to PAGE_SIZE.

Requirements

Target platform

Universal

Version

Available in Windows 8 and later versions of Windows.

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

See also

CcInitializeCacheMap

CcReadAhead

CcScheduleReadAhead

CcSetAdditionalCacheAttributes