aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig50
-rw-r--r--init/Makefile4
-rw-r--r--init/do_mounts.c2
-rw-r--r--init/init_task.c24
-rw-r--r--init/main.c7
5 files changed, 79 insertions, 8 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 6cfd71d06463..6d18ef8071b5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -458,6 +458,33 @@ config RCU_FANOUT
458 Select a specific number if testing RCU itself. 458 Select a specific number if testing RCU itself.
459 Take the default if unsure. 459 Take the default if unsure.
460 460
461config RCU_FANOUT_LEAF
462 int "Tree-based hierarchical RCU leaf-level fanout value"
463 range 2 RCU_FANOUT if 64BIT
464 range 2 RCU_FANOUT if !64BIT
465 depends on TREE_RCU || TREE_PREEMPT_RCU
466 default 16
467 help
468 This option controls the leaf-level fanout of hierarchical
469 implementations of RCU, and allows trading off cache misses
470 against lock contention. Systems that synchronize their
471 scheduling-clock interrupts for energy-efficiency reasons will
472 want the default because the smaller leaf-level fanout keeps
473 lock contention levels acceptably low. Very large systems
474 (hundreds or thousands of CPUs) will instead want to set this
475 value to the maximum value possible in order to reduce the
476 number of cache misses incurred during RCU's grace-period
477 initialization. These systems tend to run CPU-bound, and thus
478 are not helped by synchronized interrupts, and thus tend to
479 skew them, which reduces lock contention enough that large
480 leaf-level fanouts work well.
481
482 Select a specific number if testing RCU itself.
483
484 Select the maximum permissible value for large systems.
485
486 Take the default if unsure.
487
461config RCU_FANOUT_EXACT 488config RCU_FANOUT_EXACT
462 bool "Disable tree-based hierarchical RCU auto-balancing" 489 bool "Disable tree-based hierarchical RCU auto-balancing"
463 depends on TREE_RCU || TREE_PREEMPT_RCU 490 depends on TREE_RCU || TREE_PREEMPT_RCU
@@ -515,10 +542,25 @@ config RCU_BOOST_PRIO
515 depends on RCU_BOOST 542 depends on RCU_BOOST
516 default 1 543 default 1
517 help 544 help
518 This option specifies the real-time priority to which preempted 545 This option specifies the real-time priority to which long-term
519 RCU readers are to be boosted. If you are working with CPU-bound 546 preempted RCU readers are to be boosted. If you are working
520 real-time applications, you should specify a priority higher then 547 with a real-time application that has one or more CPU-bound
521 the highest-priority CPU-bound application. 548 threads running at a real-time priority level, you should set
549 RCU_BOOST_PRIO to a priority higher then the highest-priority
550 real-time CPU-bound thread. The default RCU_BOOST_PRIO value
551 of 1 is appropriate in the common case, which is real-time
552 applications that do not have any CPU-bound threads.
553
554 Some real-time applications might not have a single real-time
555 thread that saturates a given CPU, but instead might have
556 multiple real-time threads that, taken together, fully utilize
557 that CPU. In this case, you should set RCU_BOOST_PRIO to
558 a priority higher than the lowest-priority thread that is
559 conspiring to prevent the CPU from running any non-real-time
560 tasks. For example, if one thread at priority 10 and another
561 thread at priority 5 are between themselves fully consuming
562 the CPU time on a given CPU, then RCU_BOOST_PRIO should be
563 set to priority 6 or higher.
522 564
523 Specify the real-time priority, or take the default if unsure. 565 Specify the real-time priority, or take the default if unsure.
524 566
diff --git a/init/Makefile b/init/Makefile
index 0bf677aa0872..7bc47ee31c36 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -10,6 +10,10 @@ obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o
10endif 10endif
11obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o 11obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o
12 12
13ifneq ($(CONFIG_ARCH_INIT_TASK),y)
14obj-y += init_task.o
15endif
16
13mounts-y := do_mounts.o 17mounts-y := do_mounts.o
14mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o 18mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o
15mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o 19mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0e93f92a0345..42b0707c3481 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -472,7 +472,7 @@ void __init change_floppy(char *fmt, ...)
472void __init mount_root(void) 472void __init mount_root(void)
473{ 473{
474#ifdef CONFIG_ROOT_NFS 474#ifdef CONFIG_ROOT_NFS
475 if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) { 475 if (ROOT_DEV == Root_NFS) {
476 if (mount_nfs_root()) 476 if (mount_nfs_root())
477 return; 477 return;
478 478
diff --git a/init/init_task.c b/init/init_task.c
new file mode 100644
index 000000000000..8b2f3996b035
--- /dev/null
+++ b/init/init_task.c
@@ -0,0 +1,24 @@
1#include <linux/init_task.h>
2#include <linux/export.h>
3#include <linux/mqueue.h>
4#include <linux/sched.h>
5#include <linux/init.h>
6#include <linux/fs.h>
7#include <linux/mm.h>
8
9#include <asm/pgtable.h>
10#include <asm/uaccess.h>
11
12static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
13static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
14
15/* Initial task structure */
16struct task_struct init_task = INIT_TASK(init_task);
17EXPORT_SYMBOL(init_task);
18
19/*
20 * Initial thread structure. Alignment of this is handled by a special
21 * linker map entry.
22 */
23union thread_union init_thread_union __init_task_data =
24 { INIT_THREAD_INFO(init_task) };
diff --git a/init/main.c b/init/main.c
index 92c47c4dbde8..1ca6b32c4828 100644
--- a/init/main.c
+++ b/init/main.c
@@ -560,9 +560,6 @@ asmlinkage void __init start_kernel(void)
560 early_boot_irqs_disabled = false; 560 early_boot_irqs_disabled = false;
561 local_irq_enable(); 561 local_irq_enable();
562 562
563 /* Interrupts are enabled now so all GFP allocations are safe. */
564 gfp_allowed_mask = __GFP_BITS_MASK;
565
566 kmem_cache_init_late(); 563 kmem_cache_init_late();
567 564
568 /* 565 /*
@@ -847,6 +844,10 @@ static int __init kernel_init(void * unused)
847 * Wait until kthreadd is all set-up. 844 * Wait until kthreadd is all set-up.
848 */ 845 */
849 wait_for_completion(&kthreadd_done); 846 wait_for_completion(&kthreadd_done);
847
848 /* Now the scheduler is fully set up and can do blocking allocations */
849 gfp_allowed_mask = __GFP_BITS_MASK;
850
850 /* 851 /*
851 * init can allocate pages on any node 852 * init can allocate pages on any node
852 */ 853 */