aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig289
-rw-r--r--init/do_mounts.c13
-rw-r--r--init/do_mounts_md.c5
-rw-r--r--init/main.c3
4 files changed, 161 insertions, 149 deletions
diff --git a/init/Kconfig b/init/Kconfig
index a3e3bf548046..38396ec7ee36 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -298,6 +298,98 @@ config AUDIT_TREE
298 def_bool y 298 def_bool y
299 depends on AUDITSYSCALL && INOTIFY 299 depends on AUDITSYSCALL && INOTIFY
300 300
301menu "RCU Subsystem"
302
303choice
304 prompt "RCU Implementation"
305 default CLASSIC_RCU
306
307config CLASSIC_RCU
308 bool "Classic RCU"
309 help
310 This option selects the classic RCU implementation that is
311 designed for best read-side performance on non-realtime
312 systems.
313
314 Select this option if you are unsure.
315
316config TREE_RCU
317 bool "Tree-based hierarchical RCU"
318 help
319 This option selects the RCU implementation that is
320 designed for very large SMP system with hundreds or
321 thousands of CPUs.
322
323config PREEMPT_RCU
324 bool "Preemptible RCU"
325 depends on PREEMPT
326 help
327 This option reduces the latency of the kernel by making certain
328 RCU sections preemptible. Normally RCU code is non-preemptible, if
329 this option is selected then read-only RCU sections become
330 preemptible. This helps latency, but may expose bugs due to
331 now-naive assumptions about each RCU read-side critical section
332 remaining on a given CPU through its execution.
333
334endchoice
335
336config RCU_TRACE
337 bool "Enable tracing for RCU"
338 depends on TREE_RCU || PREEMPT_RCU
339 help
340 This option provides tracing in RCU which presents stats
341 in debugfs for debugging RCU implementation.
342
343 Say Y here if you want to enable RCU tracing
344 Say N if you are unsure.
345
346config RCU_FANOUT
347 int "Tree-based hierarchical RCU fanout value"
348 range 2 64 if 64BIT
349 range 2 32 if !64BIT
350 depends on TREE_RCU
351 default 64 if 64BIT
352 default 32 if !64BIT
353 help
354 This option controls the fanout of hierarchical implementations
355 of RCU, allowing RCU to work efficiently on machines with
356 large numbers of CPUs. This value must be at least the cube
357 root of NR_CPUS, which allows NR_CPUS up to 32,768 for 32-bit
358 systems and up to 262,144 for 64-bit systems.
359
360 Select a specific number if testing RCU itself.
361 Take the default if unsure.
362
363config RCU_FANOUT_EXACT
364 bool "Disable tree-based hierarchical RCU auto-balancing"
365 depends on TREE_RCU
366 default n
367 help
368 This option forces use of the exact RCU_FANOUT value specified,
369 regardless of imbalances in the hierarchy. This is useful for
370 testing RCU itself, and might one day be useful on systems with
371 strong NUMA behavior.
372
373 Without RCU_FANOUT_EXACT, the code will balance the hierarchy.
374
375 Say N if unsure.
376
377config TREE_RCU_TRACE
378 def_bool RCU_TRACE && TREE_RCU
379 select DEBUG_FS
380 help
381 This option provides tracing for the TREE_RCU implementation,
382 permitting Makefile to trivially select kernel/rcutree_trace.c.
383
384config PREEMPT_RCU_TRACE
385 def_bool RCU_TRACE && PREEMPT_RCU
386 select DEBUG_FS
387 help
388 This option provides tracing for the PREEMPT_RCU implementation,
389 permitting Makefile to trivially select kernel/rcupreempt_trace.c.
390
391endmenu # "RCU Subsystem"
392
301config IKCONFIG 393config IKCONFIG
302 tristate "Kernel .config support" 394 tristate "Kernel .config support"
303 ---help--- 395 ---help---
@@ -383,26 +475,26 @@ config CGROUP_SCHED
383 This option allows you to create arbitrary task groups 475 This option allows you to create arbitrary task groups
384 using the "cgroup" pseudo filesystem and control 476 using the "cgroup" pseudo filesystem and control
385 the cpu bandwidth allocated to each such task group. 477 the cpu bandwidth allocated to each such task group.
386 Refer to Documentation/cgroups.txt for more information 478 Refer to Documentation/cgroups/cgroups.txt for more
387 on "cgroup" pseudo filesystem. 479 information on "cgroup" pseudo filesystem.
388 480
389endchoice 481endchoice
390 482
391menu "Control Group support" 483menuconfig CGROUPS
392config CGROUPS 484 boolean "Control Group support"
393 bool "Control Group support"
394 help 485 help
395 This option add support for grouping sets of processes together, for 486 This option adds support for grouping sets of processes together, for
396 use with process control subsystems such as Cpusets, CFS, memory 487 use with process control subsystems such as Cpusets, CFS, memory
397 controls or device isolation. 488 controls or device isolation.
398 See 489 See
399 - Documentation/cpusets.txt (Cpusets)
400 - Documentation/scheduler/sched-design-CFS.txt (CFS) 490 - Documentation/scheduler/sched-design-CFS.txt (CFS)
401 - Documentation/cgroups/ (features for grouping, isolation) 491 - Documentation/cgroups/ (features for grouping, isolation
402 - Documentation/controllers/ (features for resource control) 492 and resource control)
403 493
404 Say N if unsure. 494 Say N if unsure.
405 495
496if CGROUPS
497
406config CGROUP_DEBUG 498config CGROUP_DEBUG
407 bool "Example debug cgroup subsystem" 499 bool "Example debug cgroup subsystem"
408 depends on CGROUPS 500 depends on CGROUPS
@@ -410,24 +502,24 @@ config CGROUP_DEBUG
410 help 502 help
411 This option enables a simple cgroup subsystem that 503 This option enables a simple cgroup subsystem that
412 exports useful debugging information about the cgroups 504 exports useful debugging information about the cgroups
413 framework 505 framework.
414 506
415 Say N if unsure 507 Say N if unsure.
416 508
417config CGROUP_NS 509config CGROUP_NS
418 bool "Namespace cgroup subsystem" 510 bool "Namespace cgroup subsystem"
419 depends on CGROUPS 511 depends on CGROUPS
420 help 512 help
421 Provides a simple namespace cgroup subsystem to 513 Provides a simple namespace cgroup subsystem to
422 provide hierarchical naming of sets of namespaces, 514 provide hierarchical naming of sets of namespaces,
423 for instance virtual servers and checkpoint/restart 515 for instance virtual servers and checkpoint/restart
424 jobs. 516 jobs.
425 517
426config CGROUP_FREEZER 518config CGROUP_FREEZER
427 bool "control group freezer subsystem" 519 bool "Freezer cgroup subsystem"
428 depends on CGROUPS 520 depends on CGROUPS
429 help 521 help
430 Provides a way to freeze and unfreeze all tasks in a 522 Provides a way to freeze and unfreeze all tasks in a
431 cgroup. 523 cgroup.
432 524
433config CGROUP_DEVICE 525config CGROUP_DEVICE
@@ -448,18 +540,23 @@ config CPUSETS
448 540
449 Say N if unsure. 541 Say N if unsure.
450 542
543config PROC_PID_CPUSET
544 bool "Include legacy /proc/<pid>/cpuset file"
545 depends on CPUSETS
546 default y
547
451config CGROUP_CPUACCT 548config CGROUP_CPUACCT
452 bool "Simple CPU accounting cgroup subsystem" 549 bool "Simple CPU accounting cgroup subsystem"
453 depends on CGROUPS 550 depends on CGROUPS
454 help 551 help
455 Provides a simple Resource Controller for monitoring the 552 Provides a simple Resource Controller for monitoring the
456 total CPU consumed by the tasks in a cgroup 553 total CPU consumed by the tasks in a cgroup.
457 554
458config RESOURCE_COUNTERS 555config RESOURCE_COUNTERS
459 bool "Resource counters" 556 bool "Resource counters"
460 help 557 help
461 This option enables controller independent resource accounting 558 This option enables controller independent resource accounting
462 infrastructure that works with cgroups 559 infrastructure that works with cgroups.
463 depends on CGROUPS 560 depends on CGROUPS
464 561
465config CGROUP_MEM_RES_CTLR 562config CGROUP_MEM_RES_CTLR
@@ -485,9 +582,6 @@ config CGROUP_MEM_RES_CTLR
485 This config option also selects MM_OWNER config option, which 582 This config option also selects MM_OWNER config option, which
486 could in turn add some fork/exit overhead. 583 could in turn add some fork/exit overhead.
487 584
488config MM_OWNER
489 bool
490
491config CGROUP_MEM_RES_CTLR_SWAP 585config CGROUP_MEM_RES_CTLR_SWAP
492 bool "Memory Resource Controller Swap Extension(EXPERIMENTAL)" 586 bool "Memory Resource Controller Swap Extension(EXPERIMENTAL)"
493 depends on CGROUP_MEM_RES_CTLR && SWAP && EXPERIMENTAL 587 depends on CGROUP_MEM_RES_CTLR && SWAP && EXPERIMENTAL
@@ -504,8 +598,10 @@ config CGROUP_MEM_RES_CTLR_SWAP
504 there will be no overhead from this. Even when you set this config=y, 598 there will be no overhead from this. Even when you set this config=y,
505 if boot option "noswapaccount" is set, swap will not be accounted. 599 if boot option "noswapaccount" is set, swap will not be accounted.
506 600
601endif # CGROUPS
507 602
508endmenu 603config MM_OWNER
604 bool
509 605
510config SYSFS_DEPRECATED 606config SYSFS_DEPRECATED
511 bool 607 bool
@@ -543,11 +639,6 @@ config SYSFS_DEPRECATED_V2
543 if the original kernel, that came with your distribution, has 639 if the original kernel, that came with your distribution, has
544 this option set to N. 640 this option set to N.
545 641
546config PROC_PID_CPUSET
547 bool "Include legacy /proc/<pid>/cpuset file"
548 depends on CPUSETS
549 default y
550
551config RELAY 642config RELAY
552 bool "Kernel->user space relay support (formerly relayfs)" 643 bool "Kernel->user space relay support (formerly relayfs)"
553 help 644 help
@@ -602,6 +693,14 @@ config PID_NS
602 Unless you want to work with an experimental feature 693 Unless you want to work with an experimental feature
603 say N here. 694 say N here.
604 695
696config NET_NS
697 bool "Network namespace"
698 default n
699 depends on NAMESPACES && EXPERIMENTAL && NET
700 help
701 Allow user space to create what appear to be multiple instances
702 of the network stack.
703
605config BLK_DEV_INITRD 704config BLK_DEV_INITRD
606 bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support" 705 bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
607 depends on BROKEN || !FRV 706 depends on BROKEN || !FRV
@@ -636,6 +735,9 @@ config CC_OPTIMIZE_FOR_SIZE
636config SYSCTL 735config SYSCTL
637 bool 736 bool
638 737
738config ANON_INODES
739 bool
740
639menuconfig EMBEDDED 741menuconfig EMBEDDED
640 bool "Configure standard kernel features (for small systems)" 742 bool "Configure standard kernel features (for small systems)"
641 help 743 help
@@ -686,13 +788,6 @@ config KALLSYMS_ALL
686 788
687 Say N. 789 Say N.
688 790
689config KALLSYMS_STRIP_GENERATED
690 bool "Strip machine generated symbols from kallsyms"
691 depends on KALLSYMS_ALL
692 default y
693 help
694 Say N if you want kallsyms to retain even machine generated symbols.
695
696config KALLSYMS_EXTRA_PASS 791config KALLSYMS_EXTRA_PASS
697 bool "Do an extra kallsyms pass" 792 bool "Do an extra kallsyms pass"
698 depends on KALLSYMS 793 depends on KALLSYMS
@@ -748,18 +843,6 @@ config PCSPKR_PLATFORM
748 This option allows to disable the internal PC-Speaker 843 This option allows to disable the internal PC-Speaker
749 support, saving some memory. 844 support, saving some memory.
750 845
751config COMPAT_BRK
752 bool "Disable heap randomization"
753 default y
754 help
755 Randomizing heap placement makes heap exploits harder, but it
756 also breaks ancient binaries (including anything libc5 based).
757 This option changes the bootup default to heap randomization
758 disabled, and can be overriden runtime by setting
759 /proc/sys/kernel/randomize_va_space to 2.
760
761 On non-ancient distros (post-2000 ones) N is usually a safe choice.
762
763config BASE_FULL 846config BASE_FULL
764 default y 847 default y
765 bool "Enable full-sized data structures for core" if EMBEDDED 848 bool "Enable full-sized data structures for core" if EMBEDDED
@@ -777,9 +860,6 @@ config FUTEX
777 support for "fast userspace mutexes". The resulting kernel may not 860 support for "fast userspace mutexes". The resulting kernel may not
778 run glibc-based applications correctly. 861 run glibc-based applications correctly.
779 862
780config ANON_INODES
781 bool
782
783config EPOLL 863config EPOLL
784 bool "Enable eventpoll support" if EMBEDDED 864 bool "Enable eventpoll support" if EMBEDDED
785 default y 865 default y
@@ -865,6 +945,18 @@ config SLUB_DEBUG
865 SLUB sysfs support. /sys/slab will not exist and there will be 945 SLUB sysfs support. /sys/slab will not exist and there will be
866 no support for cache validation etc. 946 no support for cache validation etc.
867 947
948config COMPAT_BRK
949 bool "Disable heap randomization"
950 default y
951 help
952 Randomizing heap placement makes heap exploits harder, but it
953 also breaks ancient binaries (including anything libc5 based).
954 This option changes the bootup default to heap randomization
955 disabled, and can be overriden runtime by setting
956 /proc/sys/kernel/randomize_va_space to 2.
957
958 On non-ancient distros (post-2000 ones) N is usually a safe choice.
959
868choice 960choice
869 prompt "Choose SLAB allocator" 961 prompt "Choose SLAB allocator"
870 default SLUB 962 default SLUB
@@ -1033,90 +1125,3 @@ source "block/Kconfig"
1033config PREEMPT_NOTIFIERS 1125config PREEMPT_NOTIFIERS
1034 bool 1126 bool
1035 1127
1036choice
1037 prompt "RCU Implementation"
1038 default CLASSIC_RCU
1039
1040config CLASSIC_RCU
1041 bool "Classic RCU"
1042 help
1043 This option selects the classic RCU implementation that is
1044 designed for best read-side performance on non-realtime
1045 systems.
1046
1047 Select this option if you are unsure.
1048
1049config TREE_RCU
1050 bool "Tree-based hierarchical RCU"
1051 help
1052 This option selects the RCU implementation that is
1053 designed for very large SMP system with hundreds or
1054 thousands of CPUs.
1055
1056config PREEMPT_RCU
1057 bool "Preemptible RCU"
1058 depends on PREEMPT
1059 help
1060 This option reduces the latency of the kernel by making certain
1061 RCU sections preemptible. Normally RCU code is non-preemptible, if
1062 this option is selected then read-only RCU sections become
1063 preemptible. This helps latency, but may expose bugs due to
1064 now-naive assumptions about each RCU read-side critical section
1065 remaining on a given CPU through its execution.
1066
1067endchoice
1068
1069config RCU_TRACE
1070 bool "Enable tracing for RCU"
1071 depends on TREE_RCU || PREEMPT_RCU
1072 help
1073 This option provides tracing in RCU which presents stats
1074 in debugfs for debugging RCU implementation.
1075
1076 Say Y here if you want to enable RCU tracing
1077 Say N if you are unsure.
1078
1079config RCU_FANOUT
1080 int "Tree-based hierarchical RCU fanout value"
1081 range 2 64 if 64BIT
1082 range 2 32 if !64BIT
1083 depends on TREE_RCU
1084 default 64 if 64BIT
1085 default 32 if !64BIT
1086 help
1087 This option controls the fanout of hierarchical implementations
1088 of RCU, allowing RCU to work efficiently on machines with
1089 large numbers of CPUs. This value must be at least the cube
1090 root of NR_CPUS, which allows NR_CPUS up to 32,768 for 32-bit
1091 systems and up to 262,144 for 64-bit systems.
1092
1093 Select a specific number if testing RCU itself.
1094 Take the default if unsure.
1095
1096config RCU_FANOUT_EXACT
1097 bool "Disable tree-based hierarchical RCU auto-balancing"
1098 depends on TREE_RCU
1099 default n
1100 help
1101 This option forces use of the exact RCU_FANOUT value specified,
1102 regardless of imbalances in the hierarchy. This is useful for
1103 testing RCU itself, and might one day be useful on systems with
1104 strong NUMA behavior.
1105
1106 Without RCU_FANOUT_EXACT, the code will balance the hierarchy.
1107
1108 Say N if unsure.
1109
1110config TREE_RCU_TRACE
1111 def_bool RCU_TRACE && TREE_RCU
1112 select DEBUG_FS
1113 help
1114 This option provides tracing for the TREE_RCU implementation,
1115 permitting Makefile to trivially select kernel/rcutree_trace.c.
1116
1117config PREEMPT_RCU_TRACE
1118 def_bool RCU_TRACE && PREEMPT_RCU
1119 select DEBUG_FS
1120 help
1121 This option provides tracing for the PREEMPT_RCU implementation,
1122 permitting Makefile to trivially select kernel/rcupreempt_trace.c.
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 708105e163df..8d4ff5afc1d8 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -370,10 +370,14 @@ void __init prepare_namespace(void)
370 ssleep(root_delay); 370 ssleep(root_delay);
371 } 371 }
372 372
373 /* wait for the known devices to complete their probing */ 373 /*
374 while (driver_probe_done() != 0) 374 * wait for the known devices to complete their probing
375 msleep(100); 375 *
376 async_synchronize_full(); 376 * Note: this is a potential source of long boot delays.
377 * For example, it is not atypical to wait 5 seconds here
378 * for the touchpad of a laptop to initialize.
379 */
380 wait_for_device_probe();
377 381
378 md_run_setup(); 382 md_run_setup();
379 383
@@ -399,6 +403,7 @@ void __init prepare_namespace(void)
399 while (driver_probe_done() != 0 || 403 while (driver_probe_done() != 0 ||
400 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) 404 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
401 msleep(100); 405 msleep(100);
406 async_synchronize_full();
402 } 407 }
403 408
404 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; 409 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index ff95e3192884..9bdddbcb3d6a 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -281,8 +281,9 @@ static void __init autodetect_raid(void)
281 */ 281 */
282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); 282 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n");
283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); 283 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n");
284 while (driver_probe_done() < 0) 284
285 msleep(100); 285 wait_for_device_probe();
286
286 fd = sys_open("/dev/md0", 0, 0); 287 fd = sys_open("/dev/md0", 0, 0);
287 if (fd >= 0) { 288 if (fd >= 0) {
288 sys_ioctl(fd, RAID_AUTORUN, raid_autopart); 289 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
diff --git a/init/main.c b/init/main.c
index 844209453c02..83697e160b3a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -97,7 +97,7 @@ static inline void mark_rodata_ro(void) { }
97extern void tc_init(void); 97extern void tc_init(void);
98#endif 98#endif
99 99
100enum system_states system_state; 100enum system_states system_state __read_mostly;
101EXPORT_SYMBOL(system_state); 101EXPORT_SYMBOL(system_state);
102 102
103/* 103/*
@@ -463,6 +463,7 @@ static noinline void __init_refok rest_init(void)
463 * at least once to get things moving: 463 * at least once to get things moving:
464 */ 464 */
465 init_idle_bootup_task(current); 465 init_idle_bootup_task(current);
466 rcu_scheduler_starting();
466 preempt_enable_no_resched(); 467 preempt_enable_no_resched();
467 schedule(); 468 schedule();
468 preempt_disable(); 469 preempt_disable();