Windows: Cc FileObject Settings

Modify the assigned CcSetReadAheadGranularity() from 64K to
the afsd_service configured chunk size.

Assign a CcSetDirtyPageThreshold() to be twice the configured chunk size.

Change-Id: I1cfa67612058cf5e08906e369236d0d8a48c54f0
Reviewed-on: http://gerrit.openafs.org/7294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2012-04-29 10:40:31 -04:00 committed by Jeffrey Altman
parent cf0d53b06a
commit 07ff10c7fc
3 changed files with 9 additions and 8 deletions

View File

@ -1198,7 +1198,10 @@ AFSCommonRead( IN PDEVICE_OBJECT DeviceObject,
pFcb);
CcSetReadAheadGranularity( pFileObject,
READ_AHEAD_GRANULARITY);
pDeviceExt->Specific.RDR.MaximumRPCLength);
CcSetDirtyPageThreshold( pFileObject,
AFS_DIRTY_CHUNK_THRESHOLD * pDeviceExt->Specific.RDR.MaximumRPCLength);
}
__except( EXCEPTION_EXECUTE_HANDLER)
{

View File

@ -359,8 +359,10 @@ AFSCommonWrite( IN PDEVICE_OBJECT DeviceObject,
pFcb);
CcSetReadAheadGranularity( pFileObject,
READ_AHEAD_GRANULARITY);
pDeviceExt->Specific.RDR.MaximumRPCLength);
CcSetDirtyPageThreshold( pFileObject,
AFS_DIRTY_CHUNK_THRESHOLD * pDeviceExt->Specific.RDR.MaximumRPCLength);
}
__except( EXCEPTION_EXECUTE_HANDLER)
{

View File

@ -206,12 +206,6 @@ NTSTATUS
//
#define AFS_SERVER_PURGE_SLEEP 6
//
// Read ahead granularity
//
#define READ_AHEAD_GRANULARITY 0x10000 // 64KB
#define AFS_DIR_ENUM_BUFFER_LEN (16 * 1024)
//
@ -351,6 +345,8 @@ NTSTATUS
#define AFS_MAXIMUM_EXTENT_RELEASE_COUNT 100
#define AFS_DIRTY_CHUNK_THRESHOLD 2
// {41966169-3FD7-4392-AFE4-E6A9D0A92C72} - generated using guidgen.exe
DEFINE_GUID (GUID_SD_AFS_REDIRECTOR_CONTROL_OBJECT,
0x41966169, 0x3fd7, 0x4392, 0xaf, 0xe4, 0xe6, 0xa9, 0xd0, 0xa9, 0x2c, 0x72);