The CcSetReadAheadGranularityEx routine sets the read-ahead granularity and enables pipelined read-ahead for a cached file.
VOID CcSetReadAheadGranularityEx( _In_ PFILE_OBJECT FileObject, _In_ ULONG Granularity, _In_ ULONG PipelinedRequestSize );
Pointer to a file object for the cached file whose read-ahead granularity is to be set.
Specifies the desired read-ahead granularity, which must be an even power of two and must be greater than or equal to PAGE_SIZE.
Specifies a desired read-ahead request size to override the system computed request size. If PipelinedRequestSize is 0, the current read-ahead request size is set to itself divided by 2.
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.
Available in Windows 8 and later versions of Windows.
|Ntifs.h (include Ntifs.h)|