diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 46 | ||||
-rw-r--r-- | init/main.c | 11 |
2 files changed, 21 insertions, 36 deletions
diff --git a/init/Kconfig b/init/Kconfig index 3f7e60995c80..8e8b76d8a272 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -316,38 +316,28 @@ choice | |||
316 | prompt "RCU Implementation" | 316 | prompt "RCU Implementation" |
317 | default TREE_RCU | 317 | default TREE_RCU |
318 | 318 | ||
319 | config CLASSIC_RCU | ||
320 | bool "Classic RCU" | ||
321 | help | ||
322 | This option selects the classic RCU implementation that is | ||
323 | designed for best read-side performance on non-realtime | ||
324 | systems. | ||
325 | |||
326 | Select this option if you are unsure. | ||
327 | |||
328 | config TREE_RCU | 319 | config TREE_RCU |
329 | bool "Tree-based hierarchical RCU" | 320 | bool "Tree-based hierarchical RCU" |
330 | help | 321 | help |
331 | This option selects the RCU implementation that is | 322 | This option selects the RCU implementation that is |
332 | designed for very large SMP system with hundreds or | 323 | designed for very large SMP system with hundreds or |
333 | thousands of CPUs. | 324 | thousands of CPUs. It also scales down nicely to |
325 | smaller systems. | ||
334 | 326 | ||
335 | config PREEMPT_RCU | 327 | config TREE_PREEMPT_RCU |
336 | bool "Preemptible RCU" | 328 | bool "Preemptable tree-based hierarchical RCU" |
337 | depends on PREEMPT | 329 | depends on PREEMPT |
338 | help | 330 | help |
339 | This option reduces the latency of the kernel by making certain | 331 | This option selects the RCU implementation that is |
340 | RCU sections preemptible. Normally RCU code is non-preemptible, if | 332 | designed for very large SMP systems with hundreds or |
341 | this option is selected then read-only RCU sections become | 333 | thousands of CPUs, but for which real-time response |
342 | preemptible. This helps latency, but may expose bugs due to | 334 | is also required. |
343 | now-naive assumptions about each RCU read-side critical section | ||
344 | remaining on a given CPU through its execution. | ||
345 | 335 | ||
346 | endchoice | 336 | endchoice |
347 | 337 | ||
348 | config RCU_TRACE | 338 | config RCU_TRACE |
349 | bool "Enable tracing for RCU" | 339 | bool "Enable tracing for RCU" |
350 | depends on TREE_RCU || PREEMPT_RCU | 340 | depends on TREE_RCU || TREE_PREEMPT_RCU |
351 | help | 341 | help |
352 | This option provides tracing in RCU which presents stats | 342 | This option provides tracing in RCU which presents stats |
353 | in debugfs for debugging RCU implementation. | 343 | in debugfs for debugging RCU implementation. |
@@ -359,7 +349,7 @@ config RCU_FANOUT | |||
359 | int "Tree-based hierarchical RCU fanout value" | 349 | int "Tree-based hierarchical RCU fanout value" |
360 | range 2 64 if 64BIT | 350 | range 2 64 if 64BIT |
361 | range 2 32 if !64BIT | 351 | range 2 32 if !64BIT |
362 | depends on TREE_RCU | 352 | depends on TREE_RCU || TREE_PREEMPT_RCU |
363 | default 64 if 64BIT | 353 | default 64 if 64BIT |
364 | default 32 if !64BIT | 354 | default 32 if !64BIT |
365 | help | 355 | help |
@@ -374,7 +364,7 @@ config RCU_FANOUT | |||
374 | 364 | ||
375 | config RCU_FANOUT_EXACT | 365 | config RCU_FANOUT_EXACT |
376 | bool "Disable tree-based hierarchical RCU auto-balancing" | 366 | bool "Disable tree-based hierarchical RCU auto-balancing" |
377 | depends on TREE_RCU | 367 | depends on TREE_RCU || TREE_PREEMPT_RCU |
378 | default n | 368 | default n |
379 | help | 369 | help |
380 | This option forces use of the exact RCU_FANOUT value specified, | 370 | This option forces use of the exact RCU_FANOUT value specified, |
@@ -387,18 +377,12 @@ config RCU_FANOUT_EXACT | |||
387 | Say N if unsure. | 377 | Say N if unsure. |
388 | 378 | ||
389 | config TREE_RCU_TRACE | 379 | config TREE_RCU_TRACE |
390 | def_bool RCU_TRACE && TREE_RCU | 380 | def_bool RCU_TRACE && ( TREE_RCU || TREE_PREEMPT_RCU ) |
391 | select DEBUG_FS | ||
392 | help | ||
393 | This option provides tracing for the TREE_RCU implementation, | ||
394 | permitting Makefile to trivially select kernel/rcutree_trace.c. | ||
395 | |||
396 | config PREEMPT_RCU_TRACE | ||
397 | def_bool RCU_TRACE && PREEMPT_RCU | ||
398 | select DEBUG_FS | 381 | select DEBUG_FS |
399 | help | 382 | help |
400 | This option provides tracing for the PREEMPT_RCU implementation, | 383 | This option provides tracing for the TREE_RCU and |
401 | permitting Makefile to trivially select kernel/rcupreempt_trace.c. | 384 | TREE_PREEMPT_RCU implementations, permitting Makefile to |
385 | trivially select kernel/rcutree_trace.c. | ||
402 | 386 | ||
403 | endmenu # "RCU Subsystem" | 387 | endmenu # "RCU Subsystem" |
404 | 388 | ||
diff --git a/init/main.c b/init/main.c index 2f9544d8435a..63904bb6ae37 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -427,6 +427,7 @@ static noinline void __init_refok rest_init(void) | |||
427 | { | 427 | { |
428 | int pid; | 428 | int pid; |
429 | 429 | ||
430 | rcu_scheduler_starting(); | ||
430 | kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); | 431 | kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); |
431 | numa_default_policy(); | 432 | numa_default_policy(); |
432 | pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); | 433 | pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); |
@@ -438,7 +439,6 @@ static noinline void __init_refok rest_init(void) | |||
438 | * at least once to get things moving: | 439 | * at least once to get things moving: |
439 | */ | 440 | */ |
440 | init_idle_bootup_task(current); | 441 | init_idle_bootup_task(current); |
441 | rcu_scheduler_starting(); | ||
442 | preempt_enable_no_resched(); | 442 | preempt_enable_no_resched(); |
443 | schedule(); | 443 | schedule(); |
444 | preempt_disable(); | 444 | preempt_disable(); |
@@ -607,7 +607,6 @@ asmlinkage void __init start_kernel(void) | |||
607 | softirq_init(); | 607 | softirq_init(); |
608 | timekeeping_init(); | 608 | timekeeping_init(); |
609 | time_init(); | 609 | time_init(); |
610 | sched_clock_init(); | ||
611 | profile_init(); | 610 | profile_init(); |
612 | if (!irqs_disabled()) | 611 | if (!irqs_disabled()) |
613 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " | 612 | printk(KERN_CRIT "start_kernel(): bug: interrupts were " |
@@ -658,6 +657,7 @@ asmlinkage void __init start_kernel(void) | |||
658 | numa_policy_init(); | 657 | numa_policy_init(); |
659 | if (late_time_init) | 658 | if (late_time_init) |
660 | late_time_init(); | 659 | late_time_init(); |
660 | sched_clock_init(); | ||
661 | calibrate_delay(); | 661 | calibrate_delay(); |
662 | pidmap_init(); | 662 | pidmap_init(); |
663 | anon_vma_init(); | 663 | anon_vma_init(); |
@@ -709,13 +709,14 @@ static void __init do_ctors(void) | |||
709 | int initcall_debug; | 709 | int initcall_debug; |
710 | core_param(initcall_debug, initcall_debug, bool, 0644); | 710 | core_param(initcall_debug, initcall_debug, bool, 0644); |
711 | 711 | ||
712 | static char msgbuf[64]; | ||
713 | static struct boot_trace_call call; | ||
714 | static struct boot_trace_ret ret; | ||
715 | |||
712 | int do_one_initcall(initcall_t fn) | 716 | int do_one_initcall(initcall_t fn) |
713 | { | 717 | { |
714 | int count = preempt_count(); | 718 | int count = preempt_count(); |
715 | ktime_t calltime, delta, rettime; | 719 | ktime_t calltime, delta, rettime; |
716 | char msgbuf[64]; | ||
717 | struct boot_trace_call call; | ||
718 | struct boot_trace_ret ret; | ||
719 | 720 | ||
720 | if (initcall_debug) { | 721 | if (initcall_debug) { |
721 | call.caller = task_pid_nr(current); | 722 | call.caller = task_pid_nr(current); |