diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 56 | ||||
-rw-r--r-- | init/main.c | 14 |
2 files changed, 35 insertions, 35 deletions
diff --git a/init/Kconfig b/init/Kconfig index 903505e66d1d..9afb971497f4 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -893,14 +893,6 @@ config ARCH_SUPPORTS_INT128 config ARCH_WANT_NUMA_VARIABLE_LOCALITY bool -config NUMA_BALANCING_DEFAULT_ENABLED - bool "Automatically enable NUMA aware memory/task placement" - default y - depends on NUMA_BALANCING - help - If set, automatic NUMA balancing will be enabled if running on a NUMA - machine. - config NUMA_BALANCING bool "Memory placement aware NUMA scheduler" depends on ARCH_SUPPORTS_NUMA_BALANCING @@ -913,6 +905,14 @@ config NUMA_BALANCING This system will be inactive on UMA systems. +config NUMA_BALANCING_DEFAULT_ENABLED + bool "Automatically enable NUMA aware memory/task placement" + default y + depends on NUMA_BALANCING + help + If set, automatic NUMA balancing will be enabled if running on a NUMA + machine. + menuconfig CGROUPS boolean "Control Group support" select KERNFS @@ -972,32 +972,17 @@ config CGROUP_CPUACCT Provides a simple Resource Controller for monitoring the total CPU consumed by the tasks in a cgroup. -config RESOURCE_COUNTERS - bool "Resource counters" - help - This option enables controller independent resource accounting - infrastructure that works with cgroups. +config PAGE_COUNTER + bool config MEMCG bool "Memory Resource Controller for Control Groups" - depends on RESOURCE_COUNTERS + select PAGE_COUNTER select EVENTFD help Provides a memory resource controller that manages both anonymous memory and page cache. (See Documentation/cgroups/memory.txt) - Note that setting this option increases fixed memory overhead - associated with each page of memory in the system. By this, - 8(16)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory - usage tracking struct at boot. Total amount of this is printed out - at boot. - - Only enable when you're ok with these trade offs and really - sure you need the memory resource controller. Even when you enable - this, you can set "cgroup_disable=memory" at your boot option to - disable memory resource controller and you can avoid overheads. - (and lose benefits of memory resource controller) - config MEMCG_SWAP bool "Memory Resource Controller Swap Extension" depends on MEMCG && SWAP @@ -1048,7 +1033,8 @@ config MEMCG_KMEM config CGROUP_HUGETLB bool "HugeTLB Resource Controller for Control Groups" - depends on RESOURCE_COUNTERS && HUGETLB_PAGE + depends on HUGETLB_PAGE + select PAGE_COUNTER default n help Provides a cgroup Resource Controller for HugeTLB pages. @@ -1294,6 +1280,22 @@ source "usr/Kconfig" endif +config INIT_FALLBACK + bool "Fall back to defaults if init= parameter is bad" + default y + help + If enabled, the kernel will try the default init binaries if an + explicit request from the init= parameter fails. + + This can have unexpected effects. For example, booting + with init=/sbin/kiosk_app will run /sbin/init or even /bin/sh + if /sbin/kiosk_app cannot be executed. + + The default value of Y is consistent with historical behavior. + Selecting N is likely to be more appropriate for most uses, + especially on kiosks and on kernels that are intended to be + run under the control of a script. + config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size" help diff --git a/init/main.c b/init/main.c index 321d0ceb26d3..ca380ec685de 100644 --- a/init/main.c +++ b/init/main.c @@ -51,7 +51,6 @@ #include <linux/mempolicy.h> #include <linux/key.h> #include <linux/buffer_head.h> -#include <linux/page_cgroup.h> #include <linux/debug_locks.h> #include <linux/debugobjects.h> #include <linux/lockdep.h> @@ -485,11 +484,6 @@ void __init __weak thread_info_cache_init(void) */ static void __init mm_init(void) { - /* - * page_cgroup requires contiguous pages, - * bigger than MAX_ORDER unless SPARSEMEM. - */ - page_cgroup_init_flatmem(); mem_init(); kmem_cache_init(); percpu_init_late(); @@ -627,7 +621,6 @@ asmlinkage __visible void __init start_kernel(void) initrd_start = 0; } #endif - page_cgroup_init(); debug_objects_mem_init(); kmemleak_init(); setup_per_cpu_pageset(); @@ -959,8 +952,13 @@ static int __ref kernel_init(void *unused) ret = run_init_process(execute_command); if (!ret) return 0; +#ifndef CONFIG_INIT_FALLBACK + panic("Requested init %s failed (error %d).", + execute_command, ret); +#else pr_err("Failed to execute %s (error %d). Attempting defaults...\n", - execute_command, ret); + execute_command, ret); +#endif } if (!try_to_run_init_process("/sbin/init") || !try_to_run_init_process("/etc/init") || |