sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// f32\sfile\sf_file_cache_defs.h
|
sl@0
|
15 |
// This file contains default settings for file caching.
|
sl@0
|
16 |
// Some of these settings may be overriden by appropriate entries in the estart.txt file
|
sl@0
|
17 |
// Sizes / lengths specified in kilobytes, timeouts in miliseconds
|
sl@0
|
18 |
//
|
sl@0
|
19 |
//
|
sl@0
|
20 |
|
sl@0
|
21 |
/**
|
sl@0
|
22 |
@file
|
sl@0
|
23 |
@internalTechnology
|
sl@0
|
24 |
*/
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
// Global file-cache settings
|
sl@0
|
28 |
const TBool KDefaultGlobalCacheEnabled = ETrue;
|
sl@0
|
29 |
const TInt KDefaultGlobalCacheSize = (32*1024); // 32768 K = 32 MBytes - the maximum for all files
|
sl@0
|
30 |
// The maximum amount of locked data allowed for all files
|
sl@0
|
31 |
const TInt KDefaultGlobalCacheMaxLockedSize = (1*1024); // 1 Mb maximum locked data
|
sl@0
|
32 |
// Low memory threshold as a percentage of total RAM.
|
sl@0
|
33 |
// If the amount of RAM drops below this value, attempts to allocate memory for a file caching will fail
|
sl@0
|
34 |
const TInt KDefaultLowMemoryThreshold = 10; // 10 % of total RAM
|
sl@0
|
35 |
|
sl@0
|
36 |
// per-drive file-cache settings.
|
sl@0
|
37 |
const TInt KDefaultFileCacheMaxReadAheadLen = (128); // 128K // NB non-configurable by estart
|
sl@0
|
38 |
const TInt KDefaultFileCacheSize = (256); // 256K
|
sl@0
|
39 |
const TInt KDefaultFairSchedulingLen = (128); // 128K
|
sl@0
|
40 |
|
sl@0
|
41 |
|
sl@0
|
42 |
enum {EFileCacheFlagOff, EFileCacheFlagEnabled, EFileCacheFlagOn};
|
sl@0
|
43 |
|
sl@0
|
44 |
// default drive cache settings - these may be overridden by estart.txt settings or file open mode
|
sl@0
|
45 |
|
sl@0
|
46 |
const TInt KDefaultFileCacheRead = EFileCacheFlagEnabled;
|
sl@0
|
47 |
const TInt KDefaultFileCacheReadAhead = EFileCacheFlagOn; // NB only enabled if read caching also enabled
|
sl@0
|
48 |
const TInt KDefaultFileCacheWrite = EFileCacheFlagEnabled;
|
sl@0
|
49 |
|
sl@0
|
50 |
/**
|
sl@0
|
51 |
If set to ETrue, media driver reads on this drive are considered to be asynchronous
|
sl@0
|
52 |
i.e. interrupt driven. This results in read-aheads being issued before completing a client read request.
|
sl@0
|
53 |
|
sl@0
|
54 |
If set to EFalse, media driver reads on this drive are considered to be synchronous
|
sl@0
|
55 |
i.e. issuing a read-ahead is likely to block any client thread which will normally be running at
|
sl@0
|
56 |
lower priority than the media driver's thread. In this case read-aheads only happen during periods
|
sl@0
|
57 |
of inactivity so as to improve latency: this is achieved by lowering the process of the drive thread
|
sl@0
|
58 |
if there is only one read-ahead request in the drive thread's queue.
|
sl@0
|
59 |
*/
|
sl@0
|
60 |
const TInt KDefaultFileCacheReadAsync = ETrue;
|
sl@0
|
61 |
|
sl@0
|
62 |
// time after which a file will be removed from closed file queue
|
sl@0
|
63 |
const TInt KDefaultClosedFileKeepAliveTime = 3000; // 3,000 ms = 3 seconds
|
sl@0
|
64 |
|
sl@0
|
65 |
// time after which a file containing dirty data will be flushed
|
sl@0
|
66 |
const TInt KDefaultDirtyDataFlushTime = 3000; // 3,000 ms = 3 seconds
|
sl@0
|
67 |
|