diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 86 | ||||
-rw-r--r-- | init/main.c | 11 |
2 files changed, 94 insertions, 3 deletions
diff --git a/init/Kconfig b/init/Kconfig index 8e9904fc3024..f6281711166d 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -945,10 +945,90 @@ source "block/Kconfig" | |||
945 | config PREEMPT_NOTIFIERS | 945 | config PREEMPT_NOTIFIERS |
946 | bool | 946 | bool |
947 | 947 | ||
948 | choice | ||
949 | prompt "RCU Implementation" | ||
950 | default CLASSIC_RCU | ||
951 | |||
948 | config CLASSIC_RCU | 952 | config CLASSIC_RCU |
949 | def_bool !PREEMPT_RCU | 953 | bool "Classic RCU" |
950 | help | 954 | help |
951 | This option selects the classic RCU implementation that is | 955 | This option selects the classic RCU implementation that is |
952 | designed for best read-side performance on non-realtime | 956 | designed for best read-side performance on non-realtime |
953 | systems. Classic RCU is the default. Note that the | 957 | systems. |
954 | PREEMPT_RCU symbol is used to select/deselect this option. | 958 | |
959 | Select this option if you are unsure. | ||
960 | |||
961 | config TREE_RCU | ||
962 | bool "Tree-based hierarchical RCU" | ||
963 | help | ||
964 | This option selects the RCU implementation that is | ||
965 | designed for very large SMP system with hundreds or | ||
966 | thousands of CPUs. | ||
967 | |||
968 | config PREEMPT_RCU | ||
969 | bool "Preemptible RCU" | ||
970 | depends on PREEMPT | ||
971 | help | ||
972 | This option reduces the latency of the kernel by making certain | ||
973 | RCU sections preemptible. Normally RCU code is non-preemptible, if | ||
974 | this option is selected then read-only RCU sections become | ||
975 | preemptible. This helps latency, but may expose bugs due to | ||
976 | now-naive assumptions about each RCU read-side critical section | ||
977 | remaining on a given CPU through its execution. | ||
978 | |||
979 | endchoice | ||
980 | |||
981 | config RCU_TRACE | ||
982 | bool "Enable tracing for RCU" | ||
983 | depends on TREE_RCU || PREEMPT_RCU | ||
984 | help | ||
985 | This option provides tracing in RCU which presents stats | ||
986 | in debugfs for debugging RCU implementation. | ||
987 | |||
988 | Say Y here if you want to enable RCU tracing | ||
989 | Say N if you are unsure. | ||
990 | |||
991 | config RCU_FANOUT | ||
992 | int "Tree-based hierarchical RCU fanout value" | ||
993 | range 2 64 if 64BIT | ||
994 | range 2 32 if !64BIT | ||
995 | depends on TREE_RCU | ||
996 | default 64 if 64BIT | ||
997 | default 32 if !64BIT | ||
998 | help | ||
999 | This option controls the fanout of hierarchical implementations | ||
1000 | of RCU, allowing RCU to work efficiently on machines with | ||
1001 | large numbers of CPUs. This value must be at least the cube | ||
1002 | root of NR_CPUS, which allows NR_CPUS up to 32,768 for 32-bit | ||
1003 | systems and up to 262,144 for 64-bit systems. | ||
1004 | |||
1005 | Select a specific number if testing RCU itself. | ||
1006 | Take the default if unsure. | ||
1007 | |||
1008 | config RCU_FANOUT_EXACT | ||
1009 | bool "Disable tree-based hierarchical RCU auto-balancing" | ||
1010 | depends on TREE_RCU | ||
1011 | default n | ||
1012 | help | ||
1013 | This option forces use of the exact RCU_FANOUT value specified, | ||
1014 | regardless of imbalances in the hierarchy. This is useful for | ||
1015 | testing RCU itself, and might one day be useful on systems with | ||
1016 | strong NUMA behavior. | ||
1017 | |||
1018 | Without RCU_FANOUT_EXACT, the code will balance the hierarchy. | ||
1019 | |||
1020 | Say N if unsure. | ||
1021 | |||
1022 | config TREE_RCU_TRACE | ||
1023 | def_bool RCU_TRACE && TREE_RCU | ||
1024 | select DEBUG_FS | ||
1025 | help | ||
1026 | This option provides tracing for the TREE_RCU implementation, | ||
1027 | permitting Makefile to trivially select kernel/rcutree_trace.c. | ||
1028 | |||
1029 | config PREEMPT_RCU_TRACE | ||
1030 | def_bool RCU_TRACE && PREEMPT_RCU | ||
1031 | select DEBUG_FS | ||
1032 | help | ||
1033 | This option provides tracing for the PREEMPT_RCU implementation, | ||
1034 | permitting Makefile to trivially select kernel/rcupreempt_trace.c. | ||
diff --git a/init/main.c b/init/main.c index 17e9757bfde2..2a7ce0f8e453 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -540,6 +540,15 @@ void __init __weak thread_info_cache_init(void) | |||
540 | { | 540 | { |
541 | } | 541 | } |
542 | 542 | ||
543 | void __init __weak arch_early_irq_init(void) | ||
544 | { | ||
545 | } | ||
546 | |||
547 | void __init __weak early_irq_init(void) | ||
548 | { | ||
549 | arch_early_irq_init(); | ||
550 | } | ||
551 | |||
543 | asmlinkage void __init start_kernel(void) | 552 | asmlinkage void __init start_kernel(void) |
544 | { | 553 | { |
545 | char * command_line; | 554 | char * command_line; |
@@ -604,6 +613,8 @@ asmlinkage void __init start_kernel(void) | |||
604 | sort_main_extable(); | 613 | sort_main_extable(); |
605 | trap_init(); | 614 | trap_init(); |
606 | rcu_init(); | 615 | rcu_init(); |
616 | /* init some links before init_ISA_irqs() */ | ||
617 | early_irq_init(); | ||
607 | init_IRQ(); | 618 | init_IRQ(); |
608 | pidhash_init(); | 619 | pidhash_init(); |
609 | init_timers(); | 620 | init_timers(); |