Package: lizardfs / 3.12.0+dfsg-3

default-nocache.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Last-Update: 2015-05-23
Forwarded: not-needed
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: advise OS to dismiss cache by default

--- a/src/chunkserver/hddspacemgr.cc
+++ b/src/chunkserver/hddspacemgr.cc
@@ -3732,9 +3732,9 @@
 }
 
 void hdd_reload(void) {
 	TRACETHIS();
-	gAdviseNoCache = cfg_getuint32("HDD_ADVISE_NO_CACHE", 0);
+	gAdviseNoCache = cfg_getuint32("HDD_ADVISE_NO_CACHE", 1);
 
 	PerformFsync = cfg_getuint32("PERFORM_FSYNC", 1);
 
 	HDDTestFreq_ms = cfg_ranged_get("HDD_TEST_FREQ", 10., 0.001, 1000000.) * 1000;
@@ -3824,9 +3824,9 @@
 	}
 	lzfs_pretty_syslog(LOG_INFO, "hdd space manager: start background hdd scanning "
 				"(searching for available chunks)");
 
-	gAdviseNoCache = cfg_getuint32("HDD_ADVISE_NO_CACHE", 0);
+	gAdviseNoCache = cfg_getuint32("HDD_ADVISE_NO_CACHE", 1);
 	HDDTestFreq_ms = cfg_ranged_get("HDD_TEST_FREQ", 10., 0.001, 1000000.) * 1000;
 
 	gPunchHolesInFiles = cfg_getuint32("HDD_PUNCH_HOLES", 0);
 
--- a/src/data/mfschunkserver.cfg.in
+++ b/src/data/mfschunkserver.cfg.in
@@ -71,10 +71,10 @@
 # HDD_TEST_FREQ = 10
 
 ## Whether to remove each chunk from page when closing it to reduce cache pressure
 ## generated by chunkserver, boolean (0 means "no").
-## (Default: 0)
-# HDD_ADVISE_NO_CACHE = 0
+## (Default: 1)
+# HDD_ADVISE_NO_CACHE = 1
 
 ## If enabled then chunkserver detects zero values in chunk data and frees
 ## corresponding file blocks (decreasing file system usage).
 ## This option works only on Linux
--- a/doc/mfschunkserver.cfg.5.txt
+++ b/doc/mfschunkserver.cfg.5.txt
@@ -79,9 +79,9 @@
 chunk test period in seconds (default is 10)
 
 *HDD_ADVISE_NO_CACHE*::
 whether to remove each chunk from page when closing it to reduce cache pressure
-generated by chunkserver (default is 0, i.e. no)
+generated by chunkserver (default is 1, i.e. yes)
 
 *HDD_PUNCH_HOLES*::
 if enabled then chunkserver detects zero values in chunk data and frees
 corresponding file blocks (decreasing file system usage). This option works only on Linux