aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig24
-rw-r--r--init/do_mounts.c7
-rw-r--r--init/main.c5
3 files changed, 27 insertions, 9 deletions
diff --git a/init/Kconfig b/init/Kconfig
index a7e48796d571..e63a017c391e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -502,6 +502,15 @@ config VM_EVENT_COUNTERS
502 on EMBEDDED systems. /proc/vmstat will only show page counts 502 on EMBEDDED systems. /proc/vmstat will only show page counts
503 if VM event counters are disabled. 503 if VM event counters are disabled.
504 504
505config SLUB_DEBUG
506 default y
507 bool "Enable SLUB debugging support" if EMBEDDED
508 help
509 SLUB has extensive debug support features. Disabling these can
510 result in significant savings in code size. This also disables
511 SLUB sysfs support. /sys/slab will not exist and there will be
512 no support for cache validation etc.
513
505choice 514choice
506 prompt "Choose SLAB allocator" 515 prompt "Choose SLAB allocator"
507 default SLAB 516 default SLAB
@@ -512,9 +521,9 @@ config SLAB
512 bool "SLAB" 521 bool "SLAB"
513 help 522 help
514 The regular slab allocator that is established and known to work 523 The regular slab allocator that is established and known to work
515 well in all environments. It organizes chache hot objects in 524 well in all environments. It organizes cache hot objects in
516 per cpu and per node queues. SLAB is the default choice for 525 per cpu and per node queues. SLAB is the default choice for
517 slab allocator. 526 a slab allocator.
518 527
519config SLUB 528config SLUB
520 depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT 529 depends on EXPERIMENTAL && !ARCH_USES_SLAB_PAGE_STRUCT
@@ -524,21 +533,20 @@ config SLUB
524 instead of managing queues of cached objects (SLAB approach). 533 instead of managing queues of cached objects (SLAB approach).
525 Per cpu caching is realized using slabs of objects instead 534 Per cpu caching is realized using slabs of objects instead
526 of queues of objects. SLUB can use memory efficiently 535 of queues of objects. SLUB can use memory efficiently
527 way and has enhanced diagnostics. 536 and has enhanced diagnostics.
528 537
529config SLOB 538config SLOB
530# 539#
531# SLOB cannot support SMP because SLAB_DESTROY_BY_RCU does not work 540# SLOB does not support SMP because SLAB_DESTROY_BY_RCU is unsupported
532# properly.
533# 541#
534 depends on EMBEDDED && !SMP && !SPARSEMEM 542 depends on EMBEDDED && !SMP && !SPARSEMEM
535 bool "SLOB (Simple Allocator)" 543 bool "SLOB (Simple Allocator)"
536 help 544 help
537 SLOB replaces the SLAB allocator with a drastically simpler 545 SLOB replaces the SLAB allocator with a drastically simpler
538 allocator. SLOB is more space efficient that SLAB but does not 546 allocator. SLOB is more space efficient that SLAB but does not
539 scale well (single lock for all operations) and is more susceptible 547 scale well (single lock for all operations) and is also highly
540 to fragmentation. SLOB it is a great choice to reduce 548 susceptible to fragmentation. SLUB can accomplish a higher object
541 memory usage and code size for embedded systems. 549 density. It is usually better to use SLUB instead of SLOB.
542 550
543endchoice 551endchoice
544 552
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 3f57ed4599d6..46fe407fb03e 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -7,6 +7,7 @@
7#include <linux/root_dev.h> 7#include <linux/root_dev.h>
8#include <linux/security.h> 8#include <linux/security.h>
9#include <linux/delay.h> 9#include <linux/delay.h>
10#include <linux/genhd.h>
10#include <linux/mount.h> 11#include <linux/mount.h>
11#include <linux/device.h> 12#include <linux/device.h>
12#include <linux/init.h> 13#include <linux/init.h>
@@ -308,17 +309,21 @@ retry:
308 /* 309 /*
309 * Allow the user to distinguish between failed sys_open 310 * Allow the user to distinguish between failed sys_open
310 * and bad superblock on root device. 311 * and bad superblock on root device.
312 * and give them a list of the available devices
311 */ 313 */
312#ifdef CONFIG_BLOCK 314#ifdef CONFIG_BLOCK
313 __bdevname(ROOT_DEV, b); 315 __bdevname(ROOT_DEV, b);
314#endif 316#endif
315 printk("VFS: Cannot open root device \"%s\" or %s\n", 317 printk("VFS: Cannot open root device \"%s\" or %s\n",
316 root_device_name, b); 318 root_device_name, b);
317 printk("Please append a correct \"root=\" boot option\n"); 319 printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
318 320
321 printk_all_partitions();
319 panic("VFS: Unable to mount root fs on %s", b); 322 panic("VFS: Unable to mount root fs on %s", b);
320 } 323 }
321 324
325 printk("List of all partitions:\n");
326 printk_all_partitions();
322 printk("No filesystem could mount root, tried: "); 327 printk("No filesystem could mount root, tried: ");
323 for (p = fs_names; *p; p += strlen(p)+1) 328 for (p = fs_names; *p; p += strlen(p)+1)
324 printk(" %s", p); 329 printk(" %s", p);
diff --git a/init/main.c b/init/main.c
index c1537e0ddceb..e8d080cab443 100644
--- a/init/main.c
+++ b/init/main.c
@@ -54,6 +54,7 @@
54#include <linux/lockdep.h> 54#include <linux/lockdep.h>
55#include <linux/pid_namespace.h> 55#include <linux/pid_namespace.h>
56#include <linux/device.h> 56#include <linux/device.h>
57#include <linux/kthread.h>
57 58
58#include <asm/io.h> 59#include <asm/io.h>
59#include <asm/bugs.h> 60#include <asm/bugs.h>
@@ -425,8 +426,12 @@ static void __init setup_command_line(char *command_line)
425static void noinline rest_init(void) 426static void noinline rest_init(void)
426 __releases(kernel_lock) 427 __releases(kernel_lock)
427{ 428{
429 int pid;
430
428 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); 431 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);
429 numa_default_policy(); 432 numa_default_policy();
433 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
434 kthreadd_task = find_task_by_pid(pid);
430 unlock_kernel(); 435 unlock_kernel();
431 436
432 /* 437 /*