Config-kernel.in 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059
  1. # Copyright (C) 2006-2014 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. config KERNEL_BUILD_USER
  7. string "Custom Kernel Build User Name"
  8. default "builder" if BUILDBOT
  9. default ""
  10. help
  11. Sets the Kernel build user string, which for example will be returned
  12. by 'uname -a' on running systems.
  13. If not set, uses system user at build time.
  14. config KERNEL_BUILD_DOMAIN
  15. string "Custom Kernel Build Domain Name"
  16. default "buildhost" if BUILDBOT
  17. default ""
  18. help
  19. Sets the Kernel build domain string, which for example will be
  20. returned by 'uname -a' on running systems.
  21. If not set, uses system hostname at build time.
  22. config KERNEL_PRINTK
  23. bool "Enable support for printk"
  24. default y
  25. config KERNEL_CRASHLOG
  26. bool "Crash logging"
  27. depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
  28. default y
  29. config KERNEL_SWAP
  30. bool "Support for paging of anonymous memory (swap)"
  31. default y if !SMALL_FLASH
  32. config KERNEL_DEBUG_FS
  33. bool "Compile the kernel with debug filesystem enabled"
  34. default y
  35. help
  36. debugfs is a virtual file system that kernel developers use to put
  37. debugging files into. Enable this option to be able to read and
  38. write to these files. Many common debugging facilities, such as
  39. ftrace, require the existence of debugfs.
  40. # remove KERNEL_MIPS_FPU_EMULATOR after kernel 4.14 and 4.14 are gone
  41. config KERNEL_MIPS_FPU_EMULATOR
  42. bool "Compile the kernel with MIPS FPU Emulator"
  43. default y if TARGET_pistachio
  44. depends on (mips || mipsel || mips64 || mips64el)
  45. config KERNEL_MIPS_FP_SUPPORT
  46. bool
  47. default y if KERNEL_MIPS_FPU_EMULATOR
  48. config KERNEL_ARM_PMU
  49. bool
  50. default n
  51. depends on (arm || aarch64)
  52. config KERNEL_X86_VSYSCALL_EMULATION
  53. bool "Enable vsyscall emulation"
  54. default n
  55. depends on x86_64
  56. help
  57. This enables emulation of the legacy vsyscall page. Disabling
  58. it is roughly equivalent to booting with vsyscall=none, except
  59. that it will also disable the helpful warning if a program
  60. tries to use a vsyscall. With this option set to N, offending
  61. programs will just segfault, citing addresses of the form
  62. 0xffffffffff600?00.
  63. This option is required by many programs built before 2013, and
  64. care should be used even with newer programs if set to N.
  65. Disabling this option saves about 7K of kernel size and
  66. possibly 4K of additional runtime pagetable memory.
  67. config KERNEL_PERF_EVENTS
  68. bool "Compile the kernel with performance events and counters"
  69. default n
  70. select KERNEL_ARM_PMU if (arm || aarch64)
  71. config KERNEL_PROFILING
  72. bool "Compile the kernel with profiling enabled"
  73. default n
  74. select KERNEL_PERF_EVENTS
  75. help
  76. Enable the extended profiling support mechanisms used by profilers such
  77. as OProfile.
  78. config KERNEL_UBSAN
  79. bool "Compile the kernel with undefined behaviour sanity checker"
  80. help
  81. This option enables undefined behaviour sanity checker
  82. Compile-time instrumentation is used to detect various undefined
  83. behaviours in runtime. Various types of checks may be enabled
  84. via boot parameter ubsan_handle
  85. (see: Documentation/dev-tools/ubsan.rst).
  86. config KERNEL_UBSAN_SANITIZE_ALL
  87. bool "Enable instrumentation for the entire kernel"
  88. depends on KERNEL_UBSAN
  89. default y
  90. help
  91. This option activates instrumentation for the entire kernel.
  92. If you don't enable this option, you have to explicitly specify
  93. UBSAN_SANITIZE := y for the files/directories you want to check for UB.
  94. Enabling this option will get kernel image size increased
  95. significantly.
  96. config KERNEL_UBSAN_ALIGNMENT
  97. bool "Enable checking of pointers alignment"
  98. depends on KERNEL_UBSAN
  99. help
  100. This option enables detection of unaligned memory accesses.
  101. Enabling this option on architectures that support unaligned
  102. accesses may produce a lot of false positives.
  103. config KERNEL_UBSAN_NULL
  104. bool "Enable checking of null pointers"
  105. depends on KERNEL_UBSAN
  106. help
  107. This option enables detection of memory accesses via a
  108. null pointer.
  109. config KERNEL_KASAN
  110. bool "Compile the kernel with KASan: runtime memory debugger"
  111. select KERNEL_SLUB_DEBUG
  112. depends on (x86_64 || aarch64)
  113. help
  114. Enables kernel address sanitizer - runtime memory debugger,
  115. designed to find out-of-bounds accesses and use-after-free bugs.
  116. This is strictly a debugging feature and it requires a gcc version
  117. of 4.9.2 or later. Detection of out of bounds accesses to stack or
  118. global variables requires gcc 5.0 or later.
  119. This feature consumes about 1/8 of available memory and brings about
  120. ~x3 performance slowdown.
  121. For better error detection enable CONFIG_STACKTRACE.
  122. Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
  123. (the resulting kernel does not boot).
  124. config KERNEL_KASAN_EXTRA
  125. bool "KAsan: extra checks"
  126. depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
  127. help
  128. This enables further checks in the kernel address sanitizer, for now
  129. it only includes the address-use-after-scope check that can lead
  130. to excessive kernel stack usage, frame size warnings and longer
  131. compile time.
  132. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
  133. choice
  134. prompt "Instrumentation type"
  135. depends on KERNEL_KASAN
  136. default KERNEL_KASAN_OUTLINE
  137. config KERNEL_KASAN_OUTLINE
  138. bool "Outline instrumentation"
  139. help
  140. Before every memory access compiler insert function call
  141. __asan_load*/__asan_store*. These functions performs check
  142. of shadow memory. This is slower than inline instrumentation,
  143. however it doesn't bloat size of kernel's .text section so
  144. much as inline does.
  145. config KERNEL_KASAN_INLINE
  146. bool "Inline instrumentation"
  147. help
  148. Compiler directly inserts code checking shadow memory before
  149. memory accesses. This is faster than outline (in some workloads
  150. it gives about x2 boost over outline instrumentation), but
  151. make kernel's .text size much bigger.
  152. This requires a gcc version of 5.0 or later.
  153. endchoice
  154. config KERNEL_KCOV
  155. bool "Compile the kernel with code coverage for fuzzing"
  156. select KERNEL_DEBUG_FS
  157. help
  158. KCOV exposes kernel code coverage information in a form suitable
  159. for coverage-guided fuzzing (randomized testing).
  160. If RANDOMIZE_BASE is enabled, PC values will not be stable across
  161. different machines and across reboots. If you need stable PC values,
  162. disable RANDOMIZE_BASE.
  163. For more details, see Documentation/kcov.txt.
  164. config KERNEL_KCOV_ENABLE_COMPARISONS
  165. bool "Enable comparison operands collection by KCOV"
  166. depends on KERNEL_KCOV
  167. help
  168. KCOV also exposes operands of every comparison in the instrumented
  169. code along with operand sizes and PCs of the comparison instructions.
  170. These operands can be used by fuzzing engines to improve the quality
  171. of fuzzing coverage.
  172. config KERNEL_KCOV_INSTRUMENT_ALL
  173. bool "Instrument all code by default"
  174. depends on KERNEL_KCOV
  175. default y if KERNEL_KCOV
  176. help
  177. If you are doing generic system call fuzzing (like e.g. syzkaller),
  178. then you will want to instrument the whole kernel and you should
  179. say y here. If you are doing more targeted fuzzing (like e.g.
  180. filesystem fuzzing with AFL) then you will want to enable coverage
  181. for more specific subsets of files, and should say n here.
  182. config KERNEL_TASKSTATS
  183. bool "Compile the kernel with task resource/io statistics and accounting"
  184. default n
  185. help
  186. Enable the collection and publishing of task/io statistics and
  187. accounting. Enable this option to enable i/o monitoring in system
  188. monitors.
  189. if KERNEL_TASKSTATS
  190. config KERNEL_TASK_DELAY_ACCT
  191. def_bool y
  192. config KERNEL_TASK_IO_ACCOUNTING
  193. def_bool y
  194. config KERNEL_TASK_XACCT
  195. def_bool y
  196. endif
  197. config KERNEL_KALLSYMS
  198. bool "Compile the kernel with symbol table information"
  199. default y if !SMALL_FLASH
  200. help
  201. This will give you more information in stack traces from kernel oopses.
  202. config KERNEL_FTRACE
  203. bool "Compile the kernel with tracing support"
  204. depends on !TARGET_uml
  205. default n
  206. config KERNEL_FTRACE_SYSCALLS
  207. bool "Trace system calls"
  208. depends on KERNEL_FTRACE
  209. default n
  210. config KERNEL_ENABLE_DEFAULT_TRACERS
  211. bool "Trace process context switches and events"
  212. depends on KERNEL_FTRACE
  213. default n
  214. config KERNEL_FUNCTION_TRACER
  215. bool "Function tracer"
  216. depends on KERNEL_FTRACE
  217. default n
  218. config KERNEL_FUNCTION_GRAPH_TRACER
  219. bool "Function graph tracer"
  220. depends on KERNEL_FUNCTION_TRACER
  221. default n
  222. config KERNEL_DYNAMIC_FTRACE
  223. bool "Enable/disable function tracing dynamically"
  224. depends on KERNEL_FUNCTION_TRACER
  225. default n
  226. config KERNEL_FUNCTION_PROFILER
  227. bool "Function profiler"
  228. depends on KERNEL_FUNCTION_TRACER
  229. default n
  230. config KERNEL_DEBUG_KERNEL
  231. bool
  232. default n
  233. config KERNEL_DEBUG_INFO
  234. bool "Compile the kernel with debug information"
  235. default y if !SMALL_FLASH
  236. select KERNEL_DEBUG_KERNEL
  237. help
  238. This will compile your kernel and modules with debug information.
  239. config KERNEL_DEBUG_LL_UART_NONE
  240. bool
  241. default n
  242. depends on arm
  243. config KERNEL_DEBUG_LL
  244. bool
  245. default n
  246. depends on arm
  247. select KERNEL_DEBUG_LL_UART_NONE
  248. help
  249. ARM low level debugging.
  250. config KERNEL_DYNAMIC_DEBUG
  251. bool "Compile the kernel with dynamic printk"
  252. select KERNEL_DEBUG_FS
  253. default n
  254. help
  255. Compiles debug level messages into the kernel, which would not
  256. otherwise be available at runtime. These messages can then be
  257. enabled/disabled based on various levels of scope - per source file,
  258. function, module, format string, and line number. This mechanism
  259. implicitly compiles in all pr_debug() and dev_dbg() calls, which
  260. enlarges the kernel text size by about 2%.
  261. config KERNEL_EARLY_PRINTK
  262. bool "Compile the kernel with early printk"
  263. default y if TARGET_bcm53xx
  264. default n
  265. depends on arm
  266. select KERNEL_DEBUG_KERNEL
  267. select KERNEL_DEBUG_LL if arm
  268. help
  269. Compile the kernel with early printk support. This is only useful for
  270. debugging purposes to send messages over the serial console in early boot.
  271. Enable this to debug early boot problems.
  272. config KERNEL_KPROBES
  273. bool "Compile the kernel with kprobes support"
  274. default n
  275. select KERNEL_FTRACE
  276. select KERNEL_PERF_EVENTS
  277. help
  278. Compiles the kernel with KPROBES support, which allows you to trap
  279. at almost any kernel address and execute a callback function.
  280. register_kprobe() establishes a probepoint and specifies the
  281. callback. Kprobes is useful for kernel debugging, non-intrusive
  282. instrumentation and testing.
  283. If in doubt, say "N".
  284. config KERNEL_KPROBE_EVENT
  285. bool
  286. default y if KERNEL_KPROBES
  287. config KERNEL_KPROBE_EVENTS
  288. bool
  289. default y if KERNEL_KPROBES
  290. config KERNEL_AIO
  291. bool "Compile the kernel with asynchronous IO support"
  292. default y if !SMALL_FLASH
  293. config KERNEL_FHANDLE
  294. bool "Compile the kernel with support for fhandle syscalls"
  295. default y if !SMALL_FLASH
  296. config KERNEL_FANOTIFY
  297. bool "Compile the kernel with modern file notification support"
  298. default y if !SMALL_FLASH
  299. config KERNEL_BLK_DEV_BSG
  300. bool "Compile the kernel with SCSI generic v4 support for any block device"
  301. default n
  302. config KERNEL_MAGIC_SYSRQ
  303. bool "Compile the kernel with SysRq support"
  304. default y
  305. config KERNEL_DEBUG_PINCTRL
  306. bool "Compile the kernel with pinctrl debugging"
  307. select KERNEL_DEBUG_KERNEL
  308. config KERNEL_DEBUG_GPIO
  309. bool "Compile the kernel with gpio debugging"
  310. select KERNEL_DEBUG_KERNEL
  311. config KERNEL_COREDUMP
  312. bool
  313. config KERNEL_ELF_CORE
  314. bool "Enable process core dump support"
  315. select KERNEL_COREDUMP
  316. default y if !SMALL_FLASH
  317. config KERNEL_PROVE_LOCKING
  318. bool "Enable kernel lock checking"
  319. select KERNEL_DEBUG_KERNEL
  320. default n
  321. config KERNEL_LOCKUP_DETECTOR
  322. bool "Compile the kernel with detect Hard and Soft Lockups"
  323. depends on KERNEL_DEBUG_KERNEL
  324. help
  325. Say Y here to enable the kernel to act as a watchdog to detect
  326. hard and soft lockups.
  327. Softlockups are bugs that cause the kernel to loop in kernel
  328. mode for more than 20 seconds, without giving other tasks a
  329. chance to run. The current stack trace is displayed upon
  330. detection and the system will stay locked up.
  331. Hardlockups are bugs that cause the CPU to loop in kernel mode
  332. for more than 10 seconds, without letting other interrupts have a
  333. chance to run. The current stack trace is displayed upon detection
  334. and the system will stay locked up.
  335. The overhead should be minimal. A periodic hrtimer runs to
  336. generate interrupts and kick the watchdog task every 4 seconds.
  337. An NMI is generated every 10 seconds or so to check for hardlockups.
  338. The frequency of hrtimer and NMI events and the soft and hard lockup
  339. thresholds can be controlled through the sysctl watchdog_thresh.
  340. config KERNEL_DETECT_HUNG_TASK
  341. bool "Compile the kernel with detect Hung Tasks"
  342. depends on KERNEL_DEBUG_KERNEL
  343. default KERNEL_LOCKUP_DETECTOR
  344. help
  345. Say Y here to enable the kernel to detect "hung tasks",
  346. which are bugs that cause the task to be stuck in
  347. uninterruptible "D" state indefinitely.
  348. When a hung task is detected, the kernel will print the
  349. current stack trace (which you should report), but the
  350. task will stay in uninterruptible state. If lockdep is
  351. enabled then all held locks will also be reported. This
  352. feature has negligible overhead.
  353. config KERNEL_WQ_WATCHDOG
  354. bool "Compile the kernel with detect Workqueue Stalls"
  355. depends on KERNEL_DEBUG_KERNEL
  356. help
  357. Say Y here to enable stall detection on workqueues. If a
  358. worker pool doesn't make forward progress on a pending work
  359. item for over a given amount of time, 30s by default, a
  360. warning message is printed along with dump of workqueue
  361. state. This can be configured through kernel parameter
  362. "workqueue.watchdog_thresh" and its sysfs counterpart.
  363. config KERNEL_DEBUG_ATOMIC_SLEEP
  364. bool "Compile the kernel with sleep inside atomic section checking"
  365. depends on KERNEL_DEBUG_KERNEL
  366. help
  367. If you say Y here, various routines which may sleep will become very
  368. noisy if they are called inside atomic sections: when a spinlock is
  369. held, inside an rcu read side critical section, inside preempt disabled
  370. sections, inside an interrupt, etc...
  371. config KERNEL_DEBUG_VM
  372. bool "Compile the kernel with debug VM"
  373. depends on KERNEL_DEBUG_KERNEL
  374. help
  375. Enable this to turn on extended checks in the virtual-memory system
  376. that may impact performance.
  377. If unsure, say N.
  378. config KERNEL_PRINTK_TIME
  379. bool "Enable printk timestamps"
  380. default y
  381. config KERNEL_SLUB_DEBUG
  382. bool
  383. config KERNEL_SLUB_DEBUG_ON
  384. bool
  385. config KERNEL_SLABINFO
  386. select KERNEL_SLUB_DEBUG
  387. select KERNEL_SLUB_DEBUG_ON
  388. bool "Enable /proc slab debug info"
  389. config KERNEL_PROC_PAGE_MONITOR
  390. bool "Enable /proc page monitoring"
  391. config KERNEL_RELAY
  392. bool
  393. config KERNEL_KEXEC
  394. bool "Enable kexec support"
  395. config KERNEL_PROC_VMCORE
  396. bool
  397. config KERNEL_PROC_KCORE
  398. bool
  399. config KERNEL_CRASH_DUMP
  400. depends on i386 || x86_64 || arm || armeb
  401. select KERNEL_KEXEC
  402. select KERNEL_PROC_VMCORE
  403. select KERNEL_PROC_KCORE
  404. bool "Enable support for kexec crashdump"
  405. default y
  406. config USE_RFKILL
  407. bool "Enable rfkill support"
  408. default RFKILL_SUPPORT
  409. config USE_SPARSE
  410. bool "Enable sparse check during kernel build"
  411. default n
  412. config KERNEL_DEVTMPFS
  413. bool "Compile the kernel with device tmpfs enabled"
  414. default n
  415. help
  416. devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
  417. devices nodes for all registered devices to simplify boot, but leaves more
  418. complex tasks to userspace (e.g. udev).
  419. if KERNEL_DEVTMPFS
  420. config KERNEL_DEVTMPFS_MOUNT
  421. bool "Automatically mount devtmpfs after root filesystem is mounted"
  422. default n
  423. endif
  424. config KERNEL_KEYS
  425. bool "Enable kernel access key retention support"
  426. default n
  427. config KERNEL_PERSISTENT_KEYRINGS
  428. bool "Enable kernel persistent keyrings"
  429. depends on KERNEL_KEYS
  430. default n
  431. config KERNEL_BIG_KEYS
  432. bool "Enable large payload keys on kernel keyrings"
  433. depends on KERNEL_KEYS
  434. default n
  435. config KERNEL_ENCRYPTED_KEYS
  436. tristate "Enable keys with encrypted payloads on kernel keyrings"
  437. depends on KERNEL_KEYS
  438. default n
  439. #
  440. # CGROUP support symbols
  441. #
  442. config KERNEL_CGROUPS
  443. bool "Enable kernel cgroups"
  444. default y if !SMALL_FLASH
  445. if KERNEL_CGROUPS
  446. config KERNEL_CGROUP_DEBUG
  447. bool "Example debug cgroup subsystem"
  448. default n
  449. help
  450. This option enables a simple cgroup subsystem that
  451. exports useful debugging information about the cgroups
  452. framework.
  453. config KERNEL_FREEZER
  454. bool
  455. default y if KERNEL_CGROUP_FREEZER
  456. config KERNEL_CGROUP_FREEZER
  457. bool "Freezer cgroup subsystem"
  458. default y
  459. help
  460. Provides a way to freeze and unfreeze all tasks in a
  461. cgroup.
  462. config KERNEL_CGROUP_DEVICE
  463. bool "Device controller for cgroups"
  464. default y
  465. help
  466. Provides a cgroup implementing whitelists for devices which
  467. a process in the cgroup can mknod or open.
  468. config KERNEL_CGROUP_PIDS
  469. bool "PIDs cgroup subsystem"
  470. default y
  471. help
  472. Provides enforcement of process number limits in the scope of a
  473. cgroup.
  474. config KERNEL_CPUSETS
  475. bool "Cpuset support"
  476. default y if !SMALL_FLASH
  477. help
  478. This option will let you create and manage CPUSETs which
  479. allow dynamically partitioning a system into sets of CPUs and
  480. Memory Nodes and assigning tasks to run only within those sets.
  481. This is primarily useful on large SMP or NUMA systems.
  482. config KERNEL_PROC_PID_CPUSET
  483. bool "Include legacy /proc/<pid>/cpuset file"
  484. default n
  485. depends on KERNEL_CPUSETS
  486. config KERNEL_CGROUP_CPUACCT
  487. bool "Simple CPU accounting cgroup subsystem"
  488. default y if !SMALL_FLASH
  489. help
  490. Provides a simple Resource Controller for monitoring the
  491. total CPU consumed by the tasks in a cgroup.
  492. config KERNEL_RESOURCE_COUNTERS
  493. bool "Resource counters"
  494. default y if !SMALL_FLASH
  495. help
  496. This option enables controller independent resource accounting
  497. infrastructure that works with cgroups.
  498. config KERNEL_MM_OWNER
  499. bool
  500. default y if KERNEL_MEMCG
  501. config KERNEL_MEMCG
  502. bool "Memory Resource Controller for Control Groups"
  503. default y if !SMALL_FLASH
  504. depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
  505. help
  506. Provides a memory resource controller that manages both anonymous
  507. memory and page cache. (See Documentation/cgroups/memory.txt)
  508. Note that setting this option increases fixed memory overhead
  509. associated with each page of memory in the system. By this,
  510. 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
  511. usage tracking struct at boot. Total amount of this is printed out
  512. at boot.
  513. Only enable when you're ok with these tradeoffs and really
  514. sure you need the memory resource controller. Even when you enable
  515. this, you can set "cgroup_disable=memory" at your boot option to
  516. disable memory resource controller and you can avoid overheads
  517. (but lose benefits of memory resource controller).
  518. This config option also selects MM_OWNER config option, which
  519. could in turn add some fork/exit overhead.
  520. config KERNEL_MEMCG_SWAP
  521. bool "Memory Resource Controller Swap Extension"
  522. default n
  523. depends on KERNEL_MEMCG
  524. help
  525. Add swap management feature to memory resource controller. When you
  526. enable this, you can limit mem+swap usage per cgroup. In other words,
  527. when you disable this, memory resource controller has no cares to
  528. usage of swap...a process can exhaust all of the swap. This extension
  529. is useful when you want to avoid exhaustion swap but this itself
  530. adds more overheads and consumes memory for remembering information.
  531. Especially if you use 32bit system or small memory system, please
  532. be careful about enabling this. When memory resource controller
  533. is disabled by boot option, this will be automatically disabled and
  534. there will be no overhead from this. Even when you set this config=y,
  535. if boot option "swapaccount=0" is set, swap will not be accounted.
  536. Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
  537. size is 4096bytes, 512k per 1Gbytes of swap.
  538. config KERNEL_MEMCG_SWAP_ENABLED
  539. bool "Memory Resource Controller Swap Extension enabled by default"
  540. default n
  541. depends on KERNEL_MEMCG_SWAP
  542. help
  543. Memory Resource Controller Swap Extension comes with its price in
  544. a bigger memory consumption. General purpose distribution kernels
  545. which want to enable the feature but keep it disabled by default
  546. and let the user enable it by swapaccount boot command line
  547. parameter should have this option unselected.
  548. Those who want to have the feature enabled by default should
  549. select this option (if, for some reason, they need to disable it,
  550. then swapaccount=0 does the trick).
  551. config KERNEL_MEMCG_KMEM
  552. bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
  553. default y if !SMALL_FLASH
  554. depends on KERNEL_MEMCG
  555. help
  556. The Kernel Memory extension for Memory Resource Controller can limit
  557. the amount of memory used by kernel objects in the system. Those are
  558. fundamentally different from the entities handled by the standard
  559. Memory Controller, which are page-based, and can be swapped. Users of
  560. the kmem extension can use it to guarantee that no group of processes
  561. will ever exhaust kernel resources alone.
  562. config KERNEL_CGROUP_PERF
  563. bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
  564. select KERNEL_PERF_EVENTS
  565. default n
  566. help
  567. This option extends the per-cpu mode to restrict monitoring to
  568. threads which belong to the cgroup specified and run on the
  569. designated cpu.
  570. menuconfig KERNEL_CGROUP_SCHED
  571. bool "Group CPU scheduler"
  572. default y if !SMALL_FLASH
  573. help
  574. This feature lets CPU scheduler recognize task groups and control CPU
  575. bandwidth allocation to such task groups. It uses cgroups to group
  576. tasks.
  577. if KERNEL_CGROUP_SCHED
  578. config KERNEL_FAIR_GROUP_SCHED
  579. bool "Group scheduling for SCHED_OTHER"
  580. default y if !SMALL_FLASH
  581. config KERNEL_CFS_BANDWIDTH
  582. bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
  583. default n
  584. depends on KERNEL_FAIR_GROUP_SCHED
  585. help
  586. This option allows users to define CPU bandwidth rates (limits) for
  587. tasks running within the fair group scheduler. Groups with no limit
  588. set are considered to be unconstrained and will run with no
  589. restriction.
  590. See tip/Documentation/scheduler/sched-bwc.txt for more information.
  591. config KERNEL_RT_GROUP_SCHED
  592. bool "Group scheduling for SCHED_RR/FIFO"
  593. default y if !SMALL_FLASH
  594. help
  595. This feature lets you explicitly allocate real CPU bandwidth
  596. to task groups. If enabled, it will also make it impossible to
  597. schedule realtime tasks for non-root users until you allocate
  598. realtime bandwidth for them.
  599. endif
  600. config KERNEL_BLK_CGROUP
  601. bool "Block IO controller"
  602. default y
  603. help
  604. Generic block IO controller cgroup interface. This is the common
  605. cgroup interface which should be used by various IO controlling
  606. policies.
  607. Currently, CFQ IO scheduler uses it to recognize task groups and
  608. control disk bandwidth allocation (proportional time slice allocation)
  609. to such task groups. It is also used by bio throttling logic in
  610. block layer to implement upper limit in IO rates on a device.
  611. This option only enables generic Block IO controller infrastructure.
  612. One needs to also enable actual IO controlling logic/policy. For
  613. enabling proportional weight division of disk bandwidth in CFQ, set
  614. CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
  615. CONFIG_BLK_DEV_THROTTLING=y.
  616. if KERNEL_BLK_CGROUP
  617. config KERNEL_CFQ_GROUP_IOSCHED
  618. bool "Proportional weight of disk bandwidth in CFQ"
  619. config KERNEL_BLK_DEV_THROTTLING
  620. bool "Enable throttling policy"
  621. default y if TARGET_bcm27xx
  622. config KERNEL_BLK_DEV_THROTTLING_LOW
  623. bool "Block throttling .low limit interface support (EXPERIMENTAL)"
  624. depends on KERNEL_BLK_DEV_THROTTLING
  625. endif
  626. config KERNEL_DEBUG_BLK_CGROUP
  627. bool "Enable Block IO controller debugging"
  628. default n
  629. depends on KERNEL_BLK_CGROUP
  630. help
  631. Enable some debugging help. Currently it exports additional stat
  632. files in a cgroup which can be useful for debugging.
  633. config KERNEL_NET_CLS_CGROUP
  634. bool "Control Group Classifier"
  635. default y
  636. config KERNEL_NETPRIO_CGROUP
  637. bool "Network priority cgroup"
  638. default y
  639. endif
  640. #
  641. # Namespace support symbols
  642. #
  643. config KERNEL_NAMESPACES
  644. bool "Enable kernel namespaces"
  645. default y if !SMALL_FLASH
  646. if KERNEL_NAMESPACES
  647. config KERNEL_UTS_NS
  648. bool "UTS namespace"
  649. default y
  650. help
  651. In this namespace, tasks see different info provided
  652. with the uname() system call.
  653. config KERNEL_IPC_NS
  654. bool "IPC namespace"
  655. default y
  656. help
  657. In this namespace, tasks work with IPC ids which correspond to
  658. different IPC objects in different namespaces.
  659. config KERNEL_USER_NS
  660. bool "User namespace (EXPERIMENTAL)"
  661. default y
  662. help
  663. This allows containers, i.e. vservers, to use user namespaces
  664. to provide different user info for different servers.
  665. config KERNEL_PID_NS
  666. bool "PID Namespaces"
  667. default y
  668. help
  669. Support process id namespaces. This allows having multiple
  670. processes with the same pid as long as they are in different
  671. pid namespaces. This is a building block of containers.
  672. config KERNEL_NET_NS
  673. bool "Network namespace"
  674. default y
  675. help
  676. Allow user space to create what appear to be multiple instances
  677. of the network stack.
  678. endif
  679. config KERNEL_DEVPTS_MULTIPLE_INSTANCES
  680. bool "Support multiple instances of devpts"
  681. default y if !SMALL_FLASH
  682. help
  683. Enable support for multiple instances of devpts filesystem.
  684. If you want to have isolated PTY namespaces (eg: in containers),
  685. say Y here. Otherwise, say N. If enabled, each mount of devpts
  686. filesystem with the '-o newinstance' option will create an
  687. independent PTY namespace.
  688. config KERNEL_POSIX_MQUEUE
  689. bool "POSIX Message Queues"
  690. default y if !SMALL_FLASH
  691. help
  692. POSIX variant of message queues is a part of IPC. In POSIX message
  693. queues every message has a priority which decides about succession
  694. of receiving it by a process. If you want to compile and run
  695. programs written e.g. for Solaris with use of its POSIX message
  696. queues (functions mq_*) say Y here.
  697. POSIX message queues are visible as a filesystem called 'mqueue'
  698. and can be mounted somewhere if you want to do filesystem
  699. operations on message queues.
  700. config KERNEL_SECCOMP_FILTER
  701. bool
  702. default y if !SMALL_FLASH
  703. config KERNEL_SECCOMP
  704. bool "Enable seccomp support"
  705. depends on !(TARGET_uml)
  706. select KERNEL_SECCOMP_FILTER
  707. default y if !SMALL_FLASH
  708. help
  709. Build kernel with support for seccomp.
  710. #
  711. # IPv4 configuration
  712. #
  713. config KERNEL_IP_MROUTE
  714. bool "Enable IPv4 multicast routing"
  715. default y
  716. help
  717. Multicast routing requires a multicast routing daemon in
  718. addition to kernel support.
  719. #
  720. # IPv6 configuration
  721. #
  722. config KERNEL_IPV6
  723. def_bool IPV6
  724. if KERNEL_IPV6
  725. config KERNEL_IPV6_MULTIPLE_TABLES
  726. def_bool y
  727. config KERNEL_IPV6_SUBTREES
  728. def_bool y
  729. config KERNEL_IPV6_MROUTE
  730. bool "Enable IPv6 multicast routing"
  731. default y
  732. help
  733. Multicast routing requires a multicast routing daemon in
  734. addition to kernel support.
  735. config KERNEL_IPV6_PIMSM_V2
  736. def_bool n
  737. endif
  738. #
  739. # NFS related symbols
  740. #
  741. config KERNEL_IP_PNP
  742. bool "Compile the kernel with rootfs on NFS"
  743. help
  744. If you want to make your kernel boot off a NFS server as root
  745. filesystem, select Y here.
  746. if KERNEL_IP_PNP
  747. config KERNEL_IP_PNP_DHCP
  748. def_bool y
  749. config KERNEL_IP_PNP_BOOTP
  750. def_bool n
  751. config KERNEL_IP_PNP_RARP
  752. def_bool n
  753. config KERNEL_NFS_FS
  754. def_bool y
  755. config KERNEL_NFS_V2
  756. def_bool y
  757. config KERNEL_NFS_V3
  758. def_bool y
  759. config KERNEL_ROOT_NFS
  760. def_bool y
  761. endif
  762. menu "Filesystem ACL and attr support options"
  763. config USE_FS_ACL_ATTR
  764. bool "Use filesystem ACL and attr support by default"
  765. default n
  766. help
  767. Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
  768. for kernel and packages, except tmpfs, flash filesystems,
  769. and old NFS. Also enable userspace extended attribute support
  770. by default. (OpenWrt already has an expection it will be
  771. present in the kernel).
  772. config KERNEL_FS_POSIX_ACL
  773. bool "Enable POSIX ACL support"
  774. default y if USE_FS_ACL_ATTR
  775. config KERNEL_BTRFS_FS_POSIX_ACL
  776. bool "Enable POSIX ACL for BtrFS Filesystems"
  777. select KERNEL_FS_POSIX_ACL
  778. default y if USE_FS_ACL_ATTR
  779. config KERNEL_EXT4_FS_POSIX_ACL
  780. bool "Enable POSIX ACL for Ext4 Filesystems"
  781. select KERNEL_FS_POSIX_ACL
  782. default y if USE_FS_ACL_ATTR
  783. config KERNEL_F2FS_FS_POSIX_ACL
  784. bool "Enable POSIX ACL for F2FS Filesystems"
  785. select KERNEL_FS_POSIX_ACL
  786. default n
  787. config KERNEL_JFFS2_FS_POSIX_ACL
  788. bool "Enable POSIX ACL for JFFS2 Filesystems"
  789. select KERNEL_FS_POSIX_ACL
  790. default n
  791. config KERNEL_TMPFS_POSIX_ACL
  792. bool "Enable POSIX ACL for TMPFS Filesystems"
  793. select KERNEL_FS_POSIX_ACL
  794. default n
  795. config KERNEL_CIFS_ACL
  796. bool "Enable CIFS ACLs"
  797. select KERNEL_FS_POSIX_ACL
  798. default y if USE_FS_ACL_ATTR
  799. config KERNEL_HFS_FS_POSIX_ACL
  800. bool "Enable POSIX ACL for HFS Filesystems"
  801. select KERNEL_FS_POSIX_ACL
  802. default y if USE_FS_ACL_ATTR
  803. config KERNEL_HFSPLUS_FS_POSIX_ACL
  804. bool "Enable POSIX ACL for HFS+ Filesystems"
  805. select KERNEL_FS_POSIX_ACL
  806. default y if USE_FS_ACL_ATTR
  807. config KERNEL_NFS_ACL_SUPPORT
  808. bool "Enable ACLs for NFS"
  809. default y if USE_FS_ACL_ATTR
  810. config KERNEL_NFS_V3_ACL_SUPPORT
  811. bool "Enable ACLs for NFSv3"
  812. default n
  813. config KERNEL_NFSD_V2_ACL_SUPPORT
  814. bool "Enable ACLs for NFSDv2"
  815. default n
  816. config KERNEL_NFSD_V3_ACL_SUPPORT
  817. bool "Enable ACLs for NFSDv3"
  818. default n
  819. config KERNEL_REISER_FS_POSIX_ACL
  820. bool "Enable POSIX ACLs for ReiserFS"
  821. select KERNEL_FS_POSIX_ACL
  822. default y if USE_FS_ACL_ATTR
  823. config KERNEL_XFS_POSIX_ACL
  824. bool "Enable POSIX ACLs for XFS"
  825. select KERNEL_FS_POSIX_ACL
  826. default y if USE_FS_ACL_ATTR
  827. config KERNEL_JFS_POSIX_ACL
  828. bool "Enable POSIX ACLs for JFS"
  829. select KERNEL_FS_POSIX_ACL
  830. default y if USE_FS_ACL_ATTR
  831. endmenu
  832. config KERNEL_DEVMEM
  833. bool "/dev/mem virtual device support"
  834. help
  835. Say Y here if you want to support the /dev/mem device.
  836. The /dev/mem device is used to access areas of physical
  837. memory.
  838. config KERNEL_DEVKMEM
  839. bool "/dev/kmem virtual device support"
  840. help
  841. Say Y here if you want to support the /dev/kmem device. The
  842. /dev/kmem device is rarely used, but can be used for certain
  843. kind of kernel debugging operations.
  844. config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
  845. int "Number of squashfs fragments cached"
  846. default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  847. default 3
  848. #
  849. # compile optimiziation setting
  850. #
  851. choice
  852. prompt "Compiler optimization level"
  853. default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
  854. config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
  855. bool "Optimize for performance"
  856. help
  857. This is the default optimization level for the kernel, building
  858. with the "-O2" compiler flag for best performance and most
  859. helpful compile-time warnings.
  860. config KERNEL_CC_OPTIMIZE_FOR_SIZE
  861. bool "Optimize for size"
  862. help
  863. Enabling this option will pass "-Os" instead of "-O2" to
  864. your compiler resulting in a smaller kernel.
  865. endchoice