Make the Rx deadtime a tunable variable, either with a kernel debugger
[openafs.git] / src / afs / LINUX / osi_sysctl.c
1 /*
2  * osi_sysctl.c: Linux sysctl interface to OpenAFS
3  *
4  * $Id$
5  *
6  * Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
7  */
8
9 #include <afsconfig.h>
10 #include "afs/param.h"
11
12 #include "afs/sysincludes.h"    /* Standard vendor system headers */
13 #include "afsincludes.h"        /* Afs-based standard headers */
14 #include "afs/afs_stats.h"   /* afs statistics */
15
16 #include <linux/sysctl.h>
17 #include <linux/config.h>
18
19 /* From afs_analyze.c */
20 extern afs_int32 hm_retry_RO;
21 extern afs_int32 hm_retry_RW;
22 extern afs_int32 hm_retry_int;
23
24 #ifdef CONFIG_SYSCTL
25 static struct ctl_table_header *afs_sysctl = NULL;
26
27 static ctl_table afs_sysctl_table[] = {
28         {1, "hm_retry_RO",
29          &hm_retry_RO, sizeof(afs_int32), 0644, NULL,
30          &proc_dointvec},
31         {2, "hm_retry_RW",
32          &hm_retry_RW, sizeof(afs_int32), 0644, NULL,
33          &proc_dointvec},
34         {3, "hm_retry_int",
35          &hm_retry_int, sizeof(afs_int32), 0644, NULL,
36          &proc_dointvec},
37         {4, "GCPAGs",
38          &afs_gcpags, sizeof(afs_int32), 0644, NULL,
39          &proc_dointvec},
40         {5, "rx_deadtime",
41          &afs_rx_deadtime, sizeof(afs_int32), 0644, NULL,
42          &proc_dointvec},
43         {0}
44 };
45
46 static ctl_table fs_sysctl_table[] = {
47         {1, "afs", NULL, 0, 0555, afs_sysctl_table},
48         {0}
49 };
50
51 int osi_sysctl_init()
52 {
53         afs_sysctl = register_sysctl_table(fs_sysctl_table, 0);
54         if (!afs_sysctl)
55                 return -1;
56
57         return 0;
58 }
59
60 void osi_sysctl_clean()
61 {
62         if (afs_sysctl) {
63                 unregister_sysctl_table(afs_sysctl);
64                 afs_sysctl = NULL;
65         }
66 }
67
68 #endif /* CONFIG_SYSCTL */