This source file includes following definitions.
- swap_setup
- buff_setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include <linux/mm.h>
15 #include <linux/sched.h>
16 #include <linux/head.h>
17 #include <linux/kernel.h>
18 #include <linux/kernel_stat.h>
19 #include <linux/errno.h>
20 #include <linux/string.h>
21 #include <linux/stat.h>
22 #include <linux/swap.h>
23 #include <linux/fs.h>
24 #include <linux/swapctl.h>
25 #include <linux/pagemap.h>
26
27 #include <asm/dma.h>
28 #include <asm/system.h>
29 #include <asm/segment.h>
30 #include <asm/bitops.h>
31 #include <asm/pgtable.h>
32
33
34
35
36
37
38
39
40
41 int min_free_pages = 20;
42 int free_pages_low = 30;
43 int free_pages_high = 40;
44
45
46
47 int nr_async_pages = 0;
48
49
50
51
52
53
54
55 swap_control_t swap_control = {
56 20, 3, 1, 3,
57 10, 2, 2, 4,
58 32, 4,
59 8192, 8192,
60 -200,
61 1, 1,
62 RCL_ROUND_ROBIN
63 };
64
65 swapstat_t swapstats = {0};
66
67
68
69
70 void swap_setup(char *str, int *ints)
71 {
72 int * swap_vars[8] = {
73 &MAX_PAGE_AGE,
74 &PAGE_ADVANCE,
75 &PAGE_DECLINE,
76 &PAGE_INITIAL_AGE,
77 &AGE_CLUSTER_FRACT,
78 &AGE_CLUSTER_MIN,
79 &PAGEOUT_WEIGHT,
80 &BUFFEROUT_WEIGHT
81 };
82 int i;
83 for (i=0; i < ints[0] && i < 8; i++) {
84 if (ints[i+1])
85 *(swap_vars[i]) = ints[i+1];
86 }
87 }
88
89
90 void buff_setup(char *str, int *ints)
91 {
92 int * buff_vars[6] = {
93 &MAX_BUFF_AGE,
94 &BUFF_ADVANCE,
95 &BUFF_DECLINE,
96 &BUFF_INITIAL_AGE,
97 &BUFFEROUT_WEIGHT,
98 &BUFFERMEM_GRACE
99 };
100 int i;
101 for (i=0; i < ints[0] && i < 6; i++) {
102 if (ints[i+1])
103 *(buff_vars[i]) = ints[i+1];
104 }
105 }
106