forked from brho/akaros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kconfig
299 lines (248 loc) · 7.94 KB
/
Kconfig
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#
# For a description of the syntax of this configuration file,
# see Linux's Documentation/kbuild/kconfig-language.txt.
#
mainmenu "Akaros/$SRCARCH Kernel Configuration"
# This is info, not a setable option. Must make ARCH=arch to change.
config SRCARCH
string
option env="ARCH"
config 64BIT
bool "64-bit kernel"
default y
help
Say yes to build a 64-bit kernel. Must be 'y' for x86.
menuconfig RUN_INIT_SCRIPT
bool "Run init script after boot"
default n
help
Run an init script after boot instead of dropping into the monitor
config INIT_SCRIPT_PATH_AND_ARGS
depends on RUN_INIT_SCRIPT
string "Path to init script, followed by its arguments."
default /bin/init.sh
help
Path to the init script run at boot time, followed by a space separated
list of arguments
source "kern/arch/$SRCARCH/Kconfig"
source "kern/src/net/Kconfig"
source "kern/drivers/Kconfig"
menu "Filesystems"
config KFS
bool "KFS filesystem"
default y
help
KFS is an initramfs bundled into the kernel, and contains your root
filesystem.
config KFS_PATHS
depends on KFS
string "KFS/Initramfs paths"
default kern/kfs
help
Space separated list of paths to directories to bundle into KFS. This
will be your root filesystem.
config KFS_CPIO_BIN
depends on KFS
string "KFS CPIO helper"
default ""
help
This binary (relative to the root directory) will be run before
bundling the KFS Paths into the CPIO.
config EXT2FS
bool "Ext2 filesystem"
default n
help
Build in support for ext2. Extremely experimental, and only works with
a block device image, which will be mounted at /mnt. If you select
this, you must specify a block device.
config EXT2_BDEV
depends on EXT2FS
string "Ext2 image file"
default mnt/ext2fs.img
help
This file needs to be an ext2 image (file that looks like a block
device). You should be able to mount this file in your host OS. It
will be bundled into the kernel and mounted at /mnt.
endmenu
choice COREALLOC_POLICY
prompt "Core Allocation Policy"
help
Select a policy for allocating cores to a process upon request. All
strategies first allocate cores from the set of provisioned cores for a
process, but differ in how they select cores beyond this.
config COREALLOC_FCFS
bool "Simple FCFS"
help
Allocate cores to processes on a first-come-first-served basis. All
cores are treated equally, and no topology information is used to try
and optimize which cores are given to which processes upon request.
endchoice
menu "Memory Management"
config PAGE_COLORING
bool "Page coloring"
default n
help
Turns on internal support for page coloring. When turned off, the page
allocator acts like there is only one color. Hasn't been used in a few
years.
config BOXBORO
depends on PAGE_COLORING
bool "Boxboro-specific page coloring"
default n
help
Say 'n'.
endmenu
menu "Kernel Debugging"
menu "Per-cpu Tracers"
config TRACE_KMSGS
bool "KMSG Tracing"
default n
help
Turns on KMSG tracing, using the per-cpu ring buffer (holds about 256
events). You can access this from the monitor via "trace pcpui". Turn
this off for a slight performance improvement on every KMSG (and every
MCP proc_yield).
config TRACE_LOCKS
bool "Lock Tracing"
depends on SPINLOCK_DEBUG
default n
help
Turns on lock tracing, using the per-cpu ring buffer. This records the
a timestamp and lock address, in an over-write tracing style (meaning
it'll clobber older events). If you have locking issues, this may give
you clues as to which locks were grabbed recently.
endmenu
config DEVELOPMENT_ASSERTIONS
bool "dasserts"
default n
help
Turn on dassert() in code, dassert will compile to assert().
config SPINLOCK_DEBUG
bool "Spinlock debugging"
default n
help
Turns on debugging, which tracks the last time a lock was acquired and
detects improper lock acquisition based on IRQ levels (e.g. using
spin_lock() in IRQ context). This will slow down all lock
acquisitions.
config SEQLOCK_DEBUG
bool "Seqlock debugging"
default n
help
Provides asserts to detect seqlock errors. This will allow a malicious
userspace to trigger a panic in the kernel.
config SEMAPHORE_DEBUG
bool "Semaphore debugging"
default n
help
Turns on debugging, which tracks the last time and location that a
semaphore was downed, and provides a linked list of all semaphores that
have waiters. This will slow down all semaphore ups and downs.
config SEM_SPINWAIT
bool "Semaphore spinwaiting"
default n
help
Turns on semaphore spinwaiting. In lieu of intelligent Adaptive
Mutexes, busy semaphores will just spin for a while before fully
sleeping.
config SEM_SPINWAIT_NR_LOOPS
int "Number of polls before sleeping"
depends on SEM_SPINWAIT
default 100
help
How many times to poll a busy semaphore before going to sleep.
config SEM_TRACE_BLOCKERS
bool "Semaphore Blocker Tracing"
default n
help
Drops a TRACEME whenever a semaphore would block (barring slight
races). To access the trace data, you'll need to use the opcontrols
and process the data with op2.
config RESET_STACKS
bool "Reset Stacks"
default y
help
When idling, the kernel will reset the stack of its kernel thread to
the top of the stack, abandoning its context. This is useful so we do
not run off the end of our stacks, but makes backtracing difficult.
config LARGE_KSTACKS
bool "Large (two-page) Kernel Stacks"
default y
help
Ideally, we'd like to use single-page stacks, which are easier on the
memory allocator. Some of the Plan 9 code hogs stack space, and we may
run off the end of a single-page stack.
Say 'y' to play it safe and use the larger, slower stacks. Say 'n' for
higher performance, and mention this setting if you have any weird
crashes or panics.
config KTHREAD_POISON
bool "Kthread Poison Canary"
default n
help
Kthreads will use a bit of storage at the bottom of the stack to track
the state of the kthread. This is useful to catch various bugs with
kthreading, such as launching the same kthread twice concurrently.
config DISABLE_SMT
bool "Disables symmetric multithreading"
default n
help
Disables hyperthreading by telling the kernel to never give out even
numbered cores to MCPs. This does not check to see if the threads are
in fact siblings, or if the target machine is hyperthreaded.
config PRINTK_NO_BACKSPACE
bool "Printk with no backspace"
default n
help
One of the serial devices I was using a while back had issues printing
backspaces. This was an old hack to deal with that.
config SYSCALL_STRING_SAVING
bool "Syscall string saving"
default n
help
Kmallocs a small buffer for each syscall and attaches it to the
kthread, which can be viewed when debugging semaphores. Individual
syscalls can save info in this buffer.
config BLOCK_EXTRAS
bool "Block Extra Data"
default y
help
Extends blocks to have a list of other memory blocks. Useful for
networking performance. This is only an option while we debug the
implementation. Say y. If you have networking bugs, try turning this
off, and if that helps, tell someone.
endmenu
menu "Misc/Old Options"
config ARSC_SERVER
bool "Asynchronous remote syscalls"
default n
help
Code to run a syscall-server on a core. A process can submit syscalls
and get the results asynchronously. Hasn't been used in years. Say
'n' unless you want to play around.
# SPARC auto-selects this
config APPSERVER
bool "Appserver"
default n
help
Old school I/O was through a remote machine. Not sure if anyone uses
this anymore.
config SERIAL_IO
bool "Serial IO"
default n
help
Like the appserver, serial I/O was an old attempt to process I/O on a
remote machine across the serial port.
config SINGLE_CORE
bool "Single core"
default n
help
Have the kernel boot only a single core. Can be useful for debugging,
but hasn't been used in years.
config BSD_ON_CORE0
bool "BSD on core 0"
default n
help
This was an old joke. Say 'n', since we can't simply #include <bsd>.
endmenu
source "kern/lib/Kconfig"
source "kern/src/ktest/Kconfig"