diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 11:37:49 -0400 |
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 11:54:19 -0400 |
| commit | c032862fba51a3ca504752d3a25186b324c5ce83 (patch) | |
| tree | 955dc2ba4ab3df76ecc2bb780ee84aca04967e8d /init | |
| parent | fda76e074c7737fc57855dd17c762e50ed526052 (diff) | |
| parent | 8700c95adb033843fc163d112b9d21d4fda78018 (diff) | |
Merge commit '8700c95adb03' into timers/nohz
The full dynticks tree needs the latest RCU and sched
upstream updates in order to fix some dependencies.
Merge a common upstream merge point that has these
updates.
Conflicts:
include/linux/perf_event.h
kernel/rcutree.h
kernel/rcutree_plugin.h
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'init')
| -rw-r--r-- | init/Kconfig | 77 | ||||
| -rw-r--r-- | init/main.c | 46 |
2 files changed, 77 insertions, 46 deletions
diff --git a/init/Kconfig b/init/Kconfig index 8f97a7407714..66f67afad4fa 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -28,10 +28,6 @@ config BUILDTIME_EXTABLE_SORT | |||
| 28 | 28 | ||
| 29 | menu "General setup" | 29 | menu "General setup" |
| 30 | 30 | ||
| 31 | config EXPERIMENTAL | ||
| 32 | bool | ||
| 33 | default y | ||
| 34 | |||
| 35 | config BROKEN | 31 | config BROKEN |
| 36 | bool | 32 | bool |
| 37 | 33 | ||
| @@ -583,13 +579,16 @@ config RCU_FAST_NO_HZ | |||
| 583 | depends on NO_HZ_COMMON && SMP | 579 | depends on NO_HZ_COMMON && SMP |
| 584 | default n | 580 | default n |
| 585 | help | 581 | help |
| 586 | This option causes RCU to attempt to accelerate grace periods in | 582 | This option permits CPUs to enter dynticks-idle state even if |
| 587 | order to allow CPUs to enter dynticks-idle state more quickly. | 583 | they have RCU callbacks queued, and prevents RCU from waking |
| 588 | On the other hand, this option increases the overhead of the | 584 | these CPUs up more than roughly once every four jiffies (by |
| 589 | dynticks-idle checking, thus degrading scheduling latency. | 585 | default, you can adjust this using the rcutree.rcu_idle_gp_delay |
| 586 | parameter), thus improving energy efficiency. On the other | ||
| 587 | hand, this option increases the duration of RCU grace periods, | ||
| 588 | for example, slowing down synchronize_rcu(). | ||
| 590 | 589 | ||
| 591 | Say Y if energy efficiency is critically important, and you don't | 590 | Say Y if energy efficiency is critically important, and you |
| 592 | care about real-time response. | 591 | don't care about increased grace-period durations. |
| 593 | 592 | ||
| 594 | Say N if you are unsure. | 593 | Say N if you are unsure. |
| 595 | 594 | ||
| @@ -656,7 +655,7 @@ config RCU_BOOST_DELAY | |||
| 656 | Accept the default if unsure. | 655 | Accept the default if unsure. |
| 657 | 656 | ||
| 658 | config RCU_NOCB_CPU | 657 | config RCU_NOCB_CPU |
| 659 | bool "Offload RCU callback processing from boot-selected CPUs" | 658 | bool "Offload RCU callback processing from boot-selected CPUs (EXPERIMENTAL" |
| 660 | depends on TREE_RCU || TREE_PREEMPT_RCU | 659 | depends on TREE_RCU || TREE_PREEMPT_RCU |
| 661 | default n | 660 | default n |
| 662 | help | 661 | help |
| @@ -667,16 +666,56 @@ config RCU_NOCB_CPU | |||
| 667 | 666 | ||
| 668 | This option offloads callback invocation from the set of | 667 | This option offloads callback invocation from the set of |
| 669 | CPUs specified at boot time by the rcu_nocbs parameter. | 668 | CPUs specified at boot time by the rcu_nocbs parameter. |
| 670 | For each such CPU, a kthread ("rcuoN") will be created to | 669 | For each such CPU, a kthread ("rcuox/N") will be created to |
| 671 | invoke callbacks, where the "N" is the CPU being offloaded. | 670 | invoke callbacks, where the "N" is the CPU being offloaded, |
| 672 | Nothing prevents this kthread from running on the specified | 671 | and where the "x" is "b" for RCU-bh, "p" for RCU-preempt, and |
| 673 | CPUs, but (1) the kthreads may be preempted between each | 672 | "s" for RCU-sched. Nothing prevents this kthread from running |
| 674 | callback, and (2) affinity or cgroups can be used to force | 673 | on the specified CPUs, but (1) the kthreads may be preempted |
| 675 | the kthreads to run on whatever set of CPUs is desired. | 674 | between each callback, and (2) affinity or cgroups can be used |
| 676 | 675 | to force the kthreads to run on whatever set of CPUs is desired. | |
| 677 | Say Y here if you want reduced OS jitter on selected CPUs. | 676 | |
| 677 | Say Y here if you want to help to debug reduced OS jitter. | ||
| 678 | Say N here if you are unsure. | 678 | Say N here if you are unsure. |
| 679 | 679 | ||
| 680 | choice | ||
| 681 | prompt "Build-forced no-CBs CPUs" | ||
| 682 | default RCU_NOCB_CPU_NONE | ||
| 683 | help | ||
| 684 | This option allows no-CBs CPUs to be specified at build time. | ||
| 685 | Additional no-CBs CPUs may be specified by the rcu_nocbs= | ||
| 686 | boot parameter. | ||
| 687 | |||
| 688 | config RCU_NOCB_CPU_NONE | ||
| 689 | bool "No build_forced no-CBs CPUs" | ||
| 690 | depends on RCU_NOCB_CPU | ||
| 691 | help | ||
| 692 | This option does not force any of the CPUs to be no-CBs CPUs. | ||
| 693 | Only CPUs designated by the rcu_nocbs= boot parameter will be | ||
| 694 | no-CBs CPUs. | ||
| 695 | |||
| 696 | config RCU_NOCB_CPU_ZERO | ||
| 697 | bool "CPU 0 is a build_forced no-CBs CPU" | ||
| 698 | depends on RCU_NOCB_CPU | ||
| 699 | help | ||
| 700 | This option forces CPU 0 to be a no-CBs CPU. Additional CPUs | ||
| 701 | may be designated as no-CBs CPUs using the rcu_nocbs= boot | ||
| 702 | parameter will be no-CBs CPUs. | ||
| 703 | |||
| 704 | Select this if CPU 0 needs to be a no-CBs CPU for real-time | ||
| 705 | or energy-efficiency reasons. | ||
| 706 | |||
| 707 | config RCU_NOCB_CPU_ALL | ||
| 708 | bool "All CPUs are build_forced no-CBs CPUs" | ||
| 709 | depends on RCU_NOCB_CPU | ||
| 710 | help | ||
| 711 | This option forces all CPUs to be no-CBs CPUs. The rcu_nocbs= | ||
| 712 | boot parameter will be ignored. | ||
| 713 | |||
| 714 | Select this if all CPUs need to be no-CBs CPUs for real-time | ||
| 715 | or energy-efficiency reasons. | ||
| 716 | |||
| 717 | endchoice | ||
| 718 | |||
| 680 | endmenu # "RCU Subsystem" | 719 | endmenu # "RCU Subsystem" |
| 681 | 720 | ||
| 682 | config IKCONFIG | 721 | config IKCONFIG |
diff --git a/init/main.c b/init/main.c index 2acb5bbde99b..1952bf2f6875 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | * Simplified starting of init: Michael A. Griffith <grif@acm.org> | 9 | * Simplified starting of init: Michael A. Griffith <grif@acm.org> |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #define DEBUG /* Enable initcall_debug */ | ||
| 13 | |||
| 12 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 14 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
| @@ -174,8 +176,8 @@ static int __init obsolete_checksetup(char *line) | |||
| 174 | if (line[n] == '\0' || line[n] == '=') | 176 | if (line[n] == '\0' || line[n] == '=') |
| 175 | had_early_param = 1; | 177 | had_early_param = 1; |
| 176 | } else if (!p->setup_func) { | 178 | } else if (!p->setup_func) { |
| 177 | printk(KERN_WARNING "Parameter %s is obsolete," | 179 | pr_warn("Parameter %s is obsolete, ignored\n", |
| 178 | " ignored\n", p->str); | 180 | p->str); |
| 179 | return 1; | 181 | return 1; |
| 180 | } else if (p->setup_func(line + n)) | 182 | } else if (p->setup_func(line + n)) |
| 181 | return 1; | 183 | return 1; |
| @@ -384,7 +386,7 @@ static noinline void __init_refok rest_init(void) | |||
| 384 | init_idle_bootup_task(current); | 386 | init_idle_bootup_task(current); |
| 385 | schedule_preempt_disabled(); | 387 | schedule_preempt_disabled(); |
| 386 | /* Call into cpu_idle with preempt disabled */ | 388 | /* Call into cpu_idle with preempt disabled */ |
| 387 | cpu_idle(); | 389 | cpu_startup_entry(CPUHP_ONLINE); |
| 388 | } | 390 | } |
| 389 | 391 | ||
| 390 | /* Check for early params. */ | 392 | /* Check for early params. */ |
| @@ -398,8 +400,7 @@ static int __init do_early_param(char *param, char *val, const char *unused) | |||
| 398 | strcmp(p->str, "earlycon") == 0) | 400 | strcmp(p->str, "earlycon") == 0) |
| 399 | ) { | 401 | ) { |
| 400 | if (p->setup_func(val) != 0) | 402 | if (p->setup_func(val) != 0) |
| 401 | printk(KERN_WARNING | 403 | pr_warn("Malformed early option '%s'\n", param); |
| 402 | "Malformed early option '%s'\n", param); | ||
| 403 | } | 404 | } |
| 404 | } | 405 | } |
| 405 | /* We accept everything at this stage. */ | 406 | /* We accept everything at this stage. */ |
| @@ -497,7 +498,7 @@ asmlinkage void __init start_kernel(void) | |||
| 497 | tick_init(); | 498 | tick_init(); |
| 498 | boot_cpu_init(); | 499 | boot_cpu_init(); |
| 499 | page_address_init(); | 500 | page_address_init(); |
| 500 | printk(KERN_NOTICE "%s", linux_banner); | 501 | pr_notice("%s", linux_banner); |
| 501 | setup_arch(&command_line); | 502 | setup_arch(&command_line); |
| 502 | mm_init_owner(&init_mm, &init_task); | 503 | mm_init_owner(&init_mm, &init_task); |
| 503 | mm_init_cpumask(&init_mm); | 504 | mm_init_cpumask(&init_mm); |
| @@ -509,7 +510,7 @@ asmlinkage void __init start_kernel(void) | |||
| 509 | build_all_zonelists(NULL, NULL); | 510 | build_all_zonelists(NULL, NULL); |
| 510 | page_alloc_init(); | 511 | page_alloc_init(); |
| 511 | 512 | ||
| 512 | printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line); | 513 | pr_notice("Kernel command line: %s\n", boot_command_line); |
| 513 | parse_early_param(); | 514 | parse_early_param(); |
| 514 | parse_args("Booting kernel", static_command_line, __start___param, | 515 | parse_args("Booting kernel", static_command_line, __start___param, |
| 515 | __stop___param - __start___param, | 516 | __stop___param - __start___param, |
| @@ -539,11 +540,8 @@ asmlinkage void __init start_kernel(void) | |||
| 539 | * fragile until we cpu_idle() for the first time. | 540 | * fragile until we cpu_idle() for the first time. |
| 540 | */ | 541 | */ |
| 541 | preempt_disable(); | 542 | preempt_disable(); |
| 542 | if (!irqs_disabled()) { | 543 | if (WARN(!irqs_disabled(), "Interrupts were enabled *very* early, fixing it\n")) |
| 543 | printk(KERN_WARNING "start_kernel(): bug: interrupts were " | ||
| 544 | "enabled *very* early, fixing it\n"); | ||
| 545 | local_irq_disable(); | 544 | local_irq_disable(); |
| 546 | } | ||
| 547 | idr_init_cache(); | 545 | idr_init_cache(); |
| 548 | perf_event_init(); | 546 | perf_event_init(); |
| 549 | rcu_init(); | 547 | rcu_init(); |
| @@ -559,9 +557,7 @@ asmlinkage void __init start_kernel(void) | |||
| 559 | time_init(); | 557 | time_init(); |
| 560 | profile_init(); | 558 | profile_init(); |
| 561 | call_function_init(); | 559 | call_function_init(); |
| 562 | if (!irqs_disabled()) | 560 | WARN(!irqs_disabled(), "Interrupts were enabled early\n"); |
| 563 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " | ||
| 564 | "enabled early\n"); | ||
| 565 | early_boot_irqs_disabled = false; | 561 | early_boot_irqs_disabled = false; |
| 566 | local_irq_enable(); | 562 | local_irq_enable(); |
| 567 | 563 | ||
| @@ -588,8 +584,7 @@ asmlinkage void __init start_kernel(void) | |||
| 588 | #ifdef CONFIG_BLK_DEV_INITRD | 584 | #ifdef CONFIG_BLK_DEV_INITRD |
| 589 | if (initrd_start && !initrd_below_start_ok && | 585 | if (initrd_start && !initrd_below_start_ok && |
| 590 | page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { | 586 | page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { |
| 591 | printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - " | 587 | pr_crit("initrd overwritten (0x%08lx < 0x%08lx) - disabling it.\n", |
| 592 | "disabling it.\n", | ||
| 593 | page_to_pfn(virt_to_page((void *)initrd_start)), | 588 | page_to_pfn(virt_to_page((void *)initrd_start)), |
| 594 | min_low_pfn); | 589 | min_low_pfn); |
| 595 | initrd_start = 0; | 590 | initrd_start = 0; |
| @@ -668,14 +663,14 @@ static int __init_or_module do_one_initcall_debug(initcall_t fn) | |||
| 668 | unsigned long long duration; | 663 | unsigned long long duration; |
| 669 | int ret; | 664 | int ret; |
| 670 | 665 | ||
| 671 | printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); | 666 | pr_debug("calling %pF @ %i\n", fn, task_pid_nr(current)); |
| 672 | calltime = ktime_get(); | 667 | calltime = ktime_get(); |
| 673 | ret = fn(); | 668 | ret = fn(); |
| 674 | rettime = ktime_get(); | 669 | rettime = ktime_get(); |
| 675 | delta = ktime_sub(rettime, calltime); | 670 | delta = ktime_sub(rettime, calltime); |
| 676 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; | 671 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; |
| 677 | printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n", fn, | 672 | pr_debug("initcall %pF returned %d after %lld usecs\n", |
| 678 | ret, duration); | 673 | fn, ret, duration); |
| 679 | 674 | ||
| 680 | return ret; | 675 | return ret; |
| 681 | } | 676 | } |
| @@ -703,9 +698,7 @@ int __init_or_module do_one_initcall(initcall_t fn) | |||
| 703 | strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); | 698 | strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); |
| 704 | local_irq_enable(); | 699 | local_irq_enable(); |
| 705 | } | 700 | } |
| 706 | if (msgbuf[0]) { | 701 | WARN(msgbuf[0], "initcall %pF returned with %s\n", fn, msgbuf); |
| 707 | printk("initcall %pF returned with %s\n", fn, msgbuf); | ||
| 708 | } | ||
| 709 | 702 | ||
| 710 | return ret; | 703 | return ret; |
| 711 | } | 704 | } |
| @@ -833,8 +826,7 @@ static int __ref kernel_init(void *unused) | |||
| 833 | if (ramdisk_execute_command) { | 826 | if (ramdisk_execute_command) { |
| 834 | if (!run_init_process(ramdisk_execute_command)) | 827 | if (!run_init_process(ramdisk_execute_command)) |
| 835 | return 0; | 828 | return 0; |
| 836 | printk(KERN_WARNING "Failed to execute %s\n", | 829 | pr_err("Failed to execute %s\n", ramdisk_execute_command); |
| 837 | ramdisk_execute_command); | ||
| 838 | } | 830 | } |
| 839 | 831 | ||
| 840 | /* | 832 | /* |
| @@ -846,8 +838,8 @@ static int __ref kernel_init(void *unused) | |||
| 846 | if (execute_command) { | 838 | if (execute_command) { |
| 847 | if (!run_init_process(execute_command)) | 839 | if (!run_init_process(execute_command)) |
| 848 | return 0; | 840 | return 0; |
| 849 | printk(KERN_WARNING "Failed to execute %s. Attempting " | 841 | pr_err("Failed to execute %s. Attempting defaults...\n", |
| 850 | "defaults...\n", execute_command); | 842 | execute_command); |
| 851 | } | 843 | } |
| 852 | if (!run_init_process("/sbin/init") || | 844 | if (!run_init_process("/sbin/init") || |
| 853 | !run_init_process("/etc/init") || | 845 | !run_init_process("/etc/init") || |
| @@ -892,7 +884,7 @@ static noinline void __init kernel_init_freeable(void) | |||
| 892 | 884 | ||
| 893 | /* Open the /dev/console on the rootfs, this should never fail */ | 885 | /* Open the /dev/console on the rootfs, this should never fail */ |
| 894 | if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) | 886 | if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) |
| 895 | printk(KERN_WARNING "Warning: unable to open an initial console.\n"); | 887 | pr_err("Warning: unable to open an initial console.\n"); |
| 896 | 888 | ||
| 897 | (void) sys_dup(0); | 889 | (void) sys_dup(0); |
| 898 | (void) sys_dup(0); | 890 | (void) sys_dup(0); |
