diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 135 | ||||
-rw-r--r-- | init/calibrate.c | 6 | ||||
-rw-r--r-- | init/main.c | 21 |
3 files changed, 124 insertions, 38 deletions
diff --git a/init/Kconfig b/init/Kconfig index c9728992a776..be788c0957d4 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -130,13 +130,16 @@ config HAVE_KERNEL_BZIP2 config HAVE_KERNEL_LZMA bool +config HAVE_KERNEL_XZ + bool + config HAVE_KERNEL_LZO bool choice prompt "Kernel compression mode" default KERNEL_GZIP - depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_LZO + depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO help The linux kernel is a kind of self-extracting executable. Several compression algorithms are available, which differ @@ -181,6 +184,21 @@ config KERNEL_LZMA two. Compression is slowest. The kernel size is about 33% smaller with LZMA in comparison to gzip. +config KERNEL_XZ + bool "XZ" + depends on HAVE_KERNEL_XZ + help + XZ uses the LZMA2 algorithm and instruction set specific + BCJ filters which can improve compression ratio of executable + code. The size of the kernel is about 30% smaller with XZ in + comparison to gzip. On architectures for which there is a BCJ + filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ + will create a few percent smaller kernel than plain LZMA. + + The speed is about the same as with LZMA: The decompression + speed of XZ is better than that of bzip2 but worse than gzip + and LZO. Compression is slow. + config KERNEL_LZO bool "LZO" depends on HAVE_KERNEL_LZO @@ -393,7 +411,6 @@ config PREEMPT_RCU config RCU_TRACE bool "Enable tracing for RCU" - depends on TREE_RCU || TREE_PREEMPT_RCU help This option provides tracing in RCU which presents stats in debugfs for debugging RCU implementation. @@ -459,6 +476,45 @@ config TREE_RCU_TRACE TREE_PREEMPT_RCU implementations, permitting Makefile to trivially select kernel/rcutree_trace.c. +config RCU_BOOST + bool "Enable RCU priority boosting" + depends on RT_MUTEXES && TINY_PREEMPT_RCU + default n + help + This option boosts the priority of preempted RCU readers that + block the current preemptible RCU grace period for too long. + This option also prevents heavy loads from blocking RCU + callback invocation for all flavors of RCU. + + Say Y here if you are working with real-time apps or heavy loads + Say N here if you are unsure. + +config RCU_BOOST_PRIO + int "Real-time priority to boost RCU readers to" + range 1 99 + depends on RCU_BOOST + default 1 + help + This option specifies the real-time priority to which preempted + RCU readers are to be boosted. If you are working with CPU-bound + real-time applications, you should specify a priority higher then + the highest-priority CPU-bound application. + + Specify the real-time priority, or take the default if unsure. + +config RCU_BOOST_DELAY + int "Milliseconds to delay boosting after RCU grace-period start" + range 0 3000 + depends on RCU_BOOST + default 500 + help + This option specifies the time to wait after the beginning of + a given grace period before priority-boosting preempted RCU + readers blocking that grace period. Note that any RCU reader + blocking an expedited RCU grace period is boosted immediately. + + Accept the default if unsure. + endmenu # "RCU Subsystem" config IKCONFIG @@ -620,7 +676,7 @@ config CGROUP_MEM_RES_CTLR_SWAP_ENABLED help Memory Resource Controller Swap Extension comes with its price in a bigger memory consumption. General purpose distribution kernels - which want to enable the feautre but keep it disabled by default + which want to enable the feature but keep it disabled by default and let the user enable it by swapaccount boot command line parameter should have this option unselected. For those who want to have the feature enabled by default should @@ -689,8 +745,8 @@ config DEBUG_BLK_CGROUP endif # CGROUPS menuconfig NAMESPACES - bool "Namespaces support" if EMBEDDED - default !EMBEDDED + bool "Namespaces support" if EXPERT + default !EXPERT help Provides the way to make tasks work with different objects using the same id. For example same IPC id may refer to different objects @@ -741,6 +797,19 @@ config NET_NS endif # NAMESPACES +config SCHED_AUTOGROUP + bool "Automatic process group scheduling" + select EVENTFD + select CGROUPS + select CGROUP_SCHED + select FAIR_GROUP_SCHED + help + This option optimizes the scheduler for common desktop workloads by + automatically creating and populating task groups. This separation + of workloads isolates aggressive CPU burners (like build jobs) from + desktop applications. Task group autogeneration is currently based + upon task session. + config MM_OWNER bool @@ -830,23 +899,31 @@ config SYSCTL config ANON_INODES bool -menuconfig EMBEDDED - bool "Configure standard kernel features (for small systems)" +menuconfig EXPERT + bool "Configure standard kernel features (expert users)" help This option allows certain base kernel options and settings to be disabled or tweaked. This is for specialized environments which can tolerate a "non-standard" kernel. Only use this if you really know what you are doing. +config EMBEDDED + bool "Embedded system" + select EXPERT + help + This option should be enabled if compiling the kernel for + an embedded system so certain expert options are available + for configuration. + config UID16 - bool "Enable 16-bit UID system calls" if EMBEDDED + bool "Enable 16-bit UID system calls" if EXPERT depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && COMPAT) || UML || (X86_64 && IA32_EMULATION) default y help This enables the legacy 16-bit UID syscall wrappers. config SYSCTL_SYSCALL - bool "Sysctl syscall support" if EMBEDDED + bool "Sysctl syscall support" if EXPERT depends on PROC_SYSCTL default y select SYSCTL @@ -863,7 +940,7 @@ config SYSCTL_SYSCALL If unsure say Y here. config KALLSYMS - bool "Load all symbols for debugging/ksymoops" if EMBEDDED + bool "Load all symbols for debugging/ksymoops" if EXPERT default y help Say Y here to let the kernel print out symbolic crash information and @@ -894,7 +971,7 @@ config KALLSYMS_EXTRA_PASS config HOTPLUG - bool "Support for hot-pluggable devices" if EMBEDDED + bool "Support for hot-pluggable devices" if EXPERT default y help This option is provided for the case where no hotplug or uevent @@ -904,7 +981,7 @@ config HOTPLUG config PRINTK default y - bool "Enable support for printk" if EMBEDDED + bool "Enable support for printk" if EXPERT help This option enables normal printk support. Removing it eliminates most of the message strings from the kernel image @@ -913,7 +990,7 @@ config PRINTK strongly discouraged. config BUG - bool "BUG() support" if EMBEDDED + bool "BUG() support" if EXPERT default y help Disabling this option eliminates support for BUG and WARN, reducing @@ -924,12 +1001,12 @@ config BUG config ELF_CORE default y - bool "Enable ELF core dumps" if EMBEDDED + bool "Enable ELF core dumps" if EXPERT help Enable support for generating core dumps. Disabling saves about 4k. config PCSPKR_PLATFORM - bool "Enable PC-Speaker support" if EMBEDDED + bool "Enable PC-Speaker support" if EXPERT depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES default y help @@ -938,14 +1015,14 @@ config PCSPKR_PLATFORM config BASE_FULL default y - bool "Enable full-sized data structures for core" if EMBEDDED + bool "Enable full-sized data structures for core" if EXPERT help Disabling this option reduces the size of miscellaneous core kernel data structures. This saves memory on small machines, but may reduce performance. config FUTEX - bool "Enable futex support" if EMBEDDED + bool "Enable futex support" if EXPERT default y select RT_MUTEXES help @@ -954,7 +1031,7 @@ config FUTEX run glibc-based applications correctly. config EPOLL - bool "Enable eventpoll support" if EMBEDDED + bool "Enable eventpoll support" if EXPERT default y select ANON_INODES help @@ -962,7 +1039,7 @@ config EPOLL support for epoll family of system calls. config SIGNALFD - bool "Enable signalfd() system call" if EMBEDDED + bool "Enable signalfd() system call" if EXPERT select ANON_INODES default y help @@ -972,7 +1049,7 @@ config SIGNALFD If unsure, say Y. config TIMERFD - bool "Enable timerfd() system call" if EMBEDDED + bool "Enable timerfd() system call" if EXPERT select ANON_INODES default y help @@ -982,7 +1059,7 @@ config TIMERFD If unsure, say Y. config EVENTFD - bool "Enable eventfd() system call" if EMBEDDED + bool "Enable eventfd() system call" if EXPERT select ANON_INODES default y help @@ -992,7 +1069,7 @@ config EVENTFD If unsure, say Y. config SHMEM - bool "Use full shmem filesystem" if EMBEDDED + bool "Use full shmem filesystem" if EXPERT default y depends on MMU help @@ -1003,7 +1080,7 @@ config SHMEM which may be appropriate on small systems without swap. config AIO - bool "Enable AIO support" if EMBEDDED + bool "Enable AIO support" if EXPERT default y help This option enables POSIX asynchronous I/O which may by used @@ -1080,16 +1157,16 @@ endmenu config VM_EVENT_COUNTERS default y - bool "Enable VM event counters for /proc/vmstat" if EMBEDDED + bool "Enable VM event counters for /proc/vmstat" if EXPERT help VM event counters are needed for event counts to be shown. This option allows the disabling of the VM event counters - on EMBEDDED systems. /proc/vmstat will only show page counts + on EXPERT systems. /proc/vmstat will only show page counts if VM event counters are disabled. config PCI_QUIRKS default y - bool "Enable PCI quirk workarounds" if EMBEDDED + bool "Enable PCI quirk workarounds" if EXPERT depends on PCI help This enables workarounds for various PCI chipset @@ -1098,7 +1175,7 @@ config PCI_QUIRKS config SLUB_DEBUG default y - bool "Enable SLUB debugging support" if EMBEDDED + bool "Enable SLUB debugging support" if EXPERT depends on SLUB && SYSFS help SLUB has extensive debug support features. Disabling these can @@ -1142,7 +1219,7 @@ config SLUB a slab allocator. config SLOB - depends on EMBEDDED + depends on EXPERT bool "SLOB (Simple Allocator)" help SLOB replaces the stock allocator with a drastically simpler @@ -1153,7 +1230,7 @@ endchoice config MMAP_ALLOW_UNINITIALIZED bool "Allow mmapped anonymous memory to be uninitialized" - depends on EMBEDDED && !MMU + depends on EXPERT && !MMU default n help Normally, and according to the Linux spec, anonymous memory obtained diff --git a/init/calibrate.c b/init/calibrate.c index 6eb48e53d61c..24fe022c55f9 100644 --- a/init/calibrate.c +++ b/init/calibrate.c @@ -66,7 +66,7 @@ static unsigned long __cpuinit calibrate_delay_direct(void) pre_start = 0; read_current_timer(&start); start_jiffies = jiffies; - while (jiffies <= (start_jiffies + 1)) { + while (time_before_eq(jiffies, start_jiffies + 1)) { pre_start = start; read_current_timer(&start); } @@ -74,8 +74,8 @@ static unsigned long __cpuinit calibrate_delay_direct(void) pre_end = 0; end = post_start; - while (jiffies <= - (start_jiffies + 1 + DELAY_CALIBRATION_TICKS)) { + while (time_before_eq(jiffies, start_jiffies + 1 + + DELAY_CALIBRATION_TICKS)) { pre_end = end; read_current_timer(&end); } diff --git a/init/main.c b/init/main.c index 8646401f7a0e..33c37c379e96 100644 --- a/init/main.c +++ b/init/main.c @@ -67,6 +67,7 @@ #include <linux/sfi.h> #include <linux/shmem_fs.h> #include <linux/slab.h> +#include <linux/perf_event.h> #include <asm/io.h> #include <asm/bugs.h> @@ -95,6 +96,15 @@ static inline void mark_rodata_ro(void) { } extern void tc_init(void); #endif +/* + * Debug helper: via this flag we know that we are in 'early bootup code' + * where only the boot processor is running with IRQ disabled. This means + * two things - IRQ must not be enabled before the flag is cleared and some + * operations which are not allowed with IRQ disabled are allowed while the + * flag is set. + */ +bool early_boot_irqs_disabled __read_mostly; + enum system_states system_state __read_mostly; EXPORT_SYMBOL(system_state); @@ -553,7 +563,7 @@ asmlinkage void __init start_kernel(void) cgroup_init_early(); local_irq_disable(); - early_boot_irqs_off(); + early_boot_irqs_disabled = true; /* * Interrupts are still disabled. Do necessary setups, then @@ -603,6 +613,8 @@ asmlinkage void __init start_kernel(void) "enabled *very* early, fixing it\n"); local_irq_disable(); } + idr_init_cache(); + perf_event_init(); rcu_init(); radix_tree_init(); /* init some links before init_ISA_irqs() */ @@ -618,7 +630,7 @@ asmlinkage void __init start_kernel(void) if (!irqs_disabled()) printk(KERN_CRIT "start_kernel(): bug: interrupts were " "enabled early\n"); - early_boot_irqs_on(); + early_boot_irqs_disabled = false; local_irq_enable(); /* Interrupts are enabled now so all GFP allocations are safe. */ @@ -658,7 +670,6 @@ asmlinkage void __init start_kernel(void) enable_debug_pagealloc(); kmemleak_init(); debug_objects_mem_init(); - idr_init_cache(); setup_per_cpu_pageset(); numa_policy_init(); if (late_time_init) @@ -775,9 +786,6 @@ static void __init do_initcalls(void) for (fn = __early_initcall_end; fn < __initcall_end; fn++) do_one_initcall(*fn); - - /* Make sure there is no pending stuff from the initcall sequence */ - flush_scheduled_work(); } /* @@ -882,6 +890,7 @@ static int __init kernel_init(void * unused) smp_prepare_cpus(setup_max_cpus); do_pre_smp_initcalls(); + lockup_detector_init(); smp_init(); sched_init_smp(); |