aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/v9fs.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2007-02-11 14:21:39 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2007-02-18 11:16:10 -0500
commite03abc0c963a31cb07dfbc07c7d85d75e0d13cf4 (patch)
tree1840001bde4a7f9f01d39dd09baf7d7b04e95706 /fs/9p/v9fs.c
parent2c0463a9ae8751547c39302aeb31c6cef16b5df4 (diff)
9p: implement optional loose read cache
While cacheing is generally frowned upon in the 9p world, it has its place -- particularly in situations where the remote file system is exclusive and/or read-only. The vacfs views of venti content addressable store are a real-world instance of such a situation. To facilitate higher performance for these workloads (and eventually use the fscache patches), we have enabled a "loose" cache mode which does not attempt to maintain any form of consistency on the page-cache or dcache. This results in over two orders of magnitude performance improvement for cacheable block reads in the Bonnie benchmark. The more aggressive use of the dcache also seems to improve metadata operational performance. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r--fs/9p/v9fs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index d9b561ba5e58..6ad6f192b6e4 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -53,6 +53,8 @@ enum {
53 Opt_uname, Opt_remotename, 53 Opt_uname, Opt_remotename,
54 /* Options that take no arguments */ 54 /* Options that take no arguments */
55 Opt_legacy, Opt_nodevmap, Opt_unix, Opt_tcp, Opt_fd, 55 Opt_legacy, Opt_nodevmap, Opt_unix, Opt_tcp, Opt_fd,
56 /* Cache options */
57 Opt_cache_loose,
56 /* Error token */ 58 /* Error token */
57 Opt_err 59 Opt_err
58}; 60};
@@ -76,6 +78,8 @@ static match_table_t tokens = {
76 {Opt_fd, "fd"}, 78 {Opt_fd, "fd"},
77 {Opt_legacy, "noextend"}, 79 {Opt_legacy, "noextend"},
78 {Opt_nodevmap, "nodevmap"}, 80 {Opt_nodevmap, "nodevmap"},
81 {Opt_cache_loose, "cache=loose"},
82 {Opt_cache_loose, "loose"},
79 {Opt_err, NULL} 83 {Opt_err, NULL}
80}; 84};
81 85
@@ -106,6 +110,7 @@ static void v9fs_parse_options(char *options, struct v9fs_session_info *v9ses)
106 v9ses->debug = 0; 110 v9ses->debug = 0;
107 v9ses->rfdno = ~0; 111 v9ses->rfdno = ~0;
108 v9ses->wfdno = ~0; 112 v9ses->wfdno = ~0;
113 v9ses->cache = 0;
109 114
110 if (!options) 115 if (!options)
111 return; 116 return;
@@ -121,7 +126,6 @@ static void v9fs_parse_options(char *options, struct v9fs_session_info *v9ses)
121 "integer field, but no integer?\n"); 126 "integer field, but no integer?\n");
122 continue; 127 continue;
123 } 128 }
124
125 } 129 }
126 switch (token) { 130 switch (token) {
127 case Opt_port: 131 case Opt_port:
@@ -169,6 +173,9 @@ static void v9fs_parse_options(char *options, struct v9fs_session_info *v9ses)
169 case Opt_nodevmap: 173 case Opt_nodevmap:
170 v9ses->nodev = 1; 174 v9ses->nodev = 1;
171 break; 175 break;
176 case Opt_cache_loose:
177 v9ses->cache = CACHE_LOOSE;
178 break;
172 default: 179 default:
173 continue; 180 continue;
174 } 181 }