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