sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // f32\sfile\sf_file_cache_defs.h sl@0: // This file contains default settings for file caching. sl@0: // Some of these settings may be overriden by appropriate entries in the estart.txt file sl@0: // Sizes / lengths specified in kilobytes, timeouts in miliseconds sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: sl@0: // Global file-cache settings sl@0: const TBool KDefaultGlobalCacheEnabled = ETrue; sl@0: const TInt KDefaultGlobalCacheSize = (32*1024); // 32768 K = 32 MBytes - the maximum for all files sl@0: // The maximum amount of locked data allowed for all files sl@0: const TInt KDefaultGlobalCacheMaxLockedSize = (1*1024); // 1 Mb maximum locked data sl@0: // Low memory threshold as a percentage of total RAM. sl@0: // If the amount of RAM drops below this value, attempts to allocate memory for a file caching will fail sl@0: const TInt KDefaultLowMemoryThreshold = 10; // 10 % of total RAM sl@0: sl@0: // per-drive file-cache settings. sl@0: const TInt KDefaultFileCacheMaxReadAheadLen = (128); // 128K // NB non-configurable by estart sl@0: const TInt KDefaultFileCacheSize = (256); // 256K sl@0: const TInt KDefaultFairSchedulingLen = (128); // 128K sl@0: sl@0: sl@0: enum {EFileCacheFlagOff, EFileCacheFlagEnabled, EFileCacheFlagOn}; sl@0: sl@0: // default drive cache settings - these may be overridden by estart.txt settings or file open mode sl@0: sl@0: const TInt KDefaultFileCacheRead = EFileCacheFlagEnabled; sl@0: const TInt KDefaultFileCacheReadAhead = EFileCacheFlagOn; // NB only enabled if read caching also enabled sl@0: const TInt KDefaultFileCacheWrite = EFileCacheFlagEnabled; sl@0: sl@0: /** sl@0: If set to ETrue, media driver reads on this drive are considered to be asynchronous sl@0: i.e. interrupt driven. This results in read-aheads being issued before completing a client read request. sl@0: sl@0: If set to EFalse, media driver reads on this drive are considered to be synchronous sl@0: i.e. issuing a read-ahead is likely to block any client thread which will normally be running at sl@0: lower priority than the media driver's thread. In this case read-aheads only happen during periods sl@0: of inactivity so as to improve latency: this is achieved by lowering the process of the drive thread sl@0: if there is only one read-ahead request in the drive thread's queue. sl@0: */ sl@0: const TInt KDefaultFileCacheReadAsync = ETrue; sl@0: sl@0: // time after which a file will be removed from closed file queue sl@0: const TInt KDefaultClosedFileKeepAliveTime = 3000; // 3,000 ms = 3 seconds sl@0: sl@0: // time after which a file containing dirty data will be flushed sl@0: const TInt KDefaultDirtyDataFlushTime = 3000; // 3,000 ms = 3 seconds sl@0: