aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig21
-rw-r--r--init/do_mounts.c45
-rw-r--r--init/initramfs.c8
-rw-r--r--init/main.c8
4 files changed, 58 insertions, 24 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 43298f9810fb..a075765d5fbe 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -469,14 +469,14 @@ config RCU_FANOUT_EXACT
469 469
470config RCU_FAST_NO_HZ 470config RCU_FAST_NO_HZ
471 bool "Accelerate last non-dyntick-idle CPU's grace periods" 471 bool "Accelerate last non-dyntick-idle CPU's grace periods"
472 depends on TREE_RCU && NO_HZ && SMP 472 depends on NO_HZ && SMP
473 default n 473 default n
474 help 474 help
475 This option causes RCU to attempt to accelerate grace periods 475 This option causes RCU to attempt to accelerate grace periods
476 in order to allow the final CPU to enter dynticks-idle state 476 in order to allow CPUs to enter dynticks-idle state more
477 more quickly. On the other hand, this option increases the 477 quickly. On the other hand, this option increases the overhead
478 overhead of the dynticks-idle checking, particularly on systems 478 of the dynticks-idle checking, particularly on systems with
479 with large numbers of CPUs. 479 large numbers of CPUs.
480 480
481 Say Y if energy efficiency is critically important, particularly 481 Say Y if energy efficiency is critically important, particularly
482 if you have relatively few CPUs. 482 if you have relatively few CPUs.
@@ -689,6 +689,17 @@ config CGROUP_MEM_RES_CTLR_SWAP_ENABLED
689 For those who want to have the feature enabled by default should 689 For those who want to have the feature enabled by default should
690 select this option (if, for some reason, they need to disable it 690 select this option (if, for some reason, they need to disable it
691 then swapaccount=0 does the trick). 691 then swapaccount=0 does the trick).
692config CGROUP_MEM_RES_CTLR_KMEM
693 bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
694 depends on CGROUP_MEM_RES_CTLR && EXPERIMENTAL
695 default n
696 help
697 The Kernel Memory extension for Memory Resource Controller can limit
698 the amount of memory used by kernel objects in the system. Those are
699 fundamentally different from the entities handled by the standard
700 Memory Controller, which are page-based, and can be swapped. Users of
701 the kmem extension can use it to guarantee that no group of processes
702 will ever exhaust kernel resources alone.
692 703
693config CGROUP_PERF 704config CGROUP_PERF
694 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring" 705 bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0f6e1d985a3b..2974c8b3b351 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -325,17 +325,19 @@ static void __init get_fs_names(char *page)
325 325
326static int __init do_mount_root(char *name, char *fs, int flags, void *data) 326static int __init do_mount_root(char *name, char *fs, int flags, void *data)
327{ 327{
328 struct super_block *s;
328 int err = sys_mount(name, "/root", fs, flags, data); 329 int err = sys_mount(name, "/root", fs, flags, data);
329 if (err) 330 if (err)
330 return err; 331 return err;
331 332
332 sys_chdir((const char __user __force *)"/root"); 333 sys_chdir((const char __user __force *)"/root");
333 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; 334 s = current->fs->pwd.dentry->d_sb;
335 ROOT_DEV = s->s_dev;
334 printk(KERN_INFO 336 printk(KERN_INFO
335 "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", 337 "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
336 current->fs->pwd.mnt->mnt_sb->s_type->name, 338 s->s_type->name,
337 current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ? 339 s->s_flags & MS_RDONLY ? " readonly" : "",
338 " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); 340 MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
339 return 0; 341 return 0;
340} 342}
341 343
@@ -398,15 +400,42 @@ out:
398} 400}
399 401
400#ifdef CONFIG_ROOT_NFS 402#ifdef CONFIG_ROOT_NFS
403
404#define NFSROOT_TIMEOUT_MIN 5
405#define NFSROOT_TIMEOUT_MAX 30
406#define NFSROOT_RETRY_MAX 5
407
401static int __init mount_nfs_root(void) 408static int __init mount_nfs_root(void)
402{ 409{
403 char *root_dev, *root_data; 410 char *root_dev, *root_data;
411 unsigned int timeout;
412 int try, err;
404 413
405 if (nfs_root_data(&root_dev, &root_data) != 0) 414 err = nfs_root_data(&root_dev, &root_data);
406 return 0; 415 if (err != 0)
407 if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0)
408 return 0; 416 return 0;
409 return 1; 417
418 /*
419 * The server or network may not be ready, so try several
420 * times. Stop after a few tries in case the client wants
421 * to fall back to other boot methods.
422 */
423 timeout = NFSROOT_TIMEOUT_MIN;
424 for (try = 1; ; try++) {
425 err = do_mount_root(root_dev, "nfs",
426 root_mountflags, root_data);
427 if (err == 0)
428 return 1;
429 if (try > NFSROOT_RETRY_MAX)
430 break;
431
432 /* Wait, in case the server refused us immediately */
433 ssleep(timeout);
434 timeout <<= 1;
435 if (timeout > NFSROOT_TIMEOUT_MAX)
436 timeout = NFSROOT_TIMEOUT_MAX;
437 }
438 return 0;
410} 439}
411#endif 440#endif
412 441
diff --git a/init/initramfs.c b/init/initramfs.c
index 2531811d42cb..8216c303b082 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -22,7 +22,7 @@ static void __init error(char *x)
22 22
23static __initdata struct hash { 23static __initdata struct hash {
24 int ino, minor, major; 24 int ino, minor, major;
25 mode_t mode; 25 umode_t mode;
26 struct hash *next; 26 struct hash *next;
27 char name[N_ALIGN(PATH_MAX)]; 27 char name[N_ALIGN(PATH_MAX)];
28} *head[32]; 28} *head[32];
@@ -35,7 +35,7 @@ static inline int hash(int major, int minor, int ino)
35} 35}
36 36
37static char __init *find_link(int major, int minor, int ino, 37static char __init *find_link(int major, int minor, int ino,
38 mode_t mode, char *name) 38 umode_t mode, char *name)
39{ 39{
40 struct hash **p, *q; 40 struct hash **p, *q;
41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { 41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) {
@@ -120,7 +120,7 @@ static __initdata time_t mtime;
120/* cpio header parsing */ 120/* cpio header parsing */
121 121
122static __initdata unsigned long ino, major, minor, nlink; 122static __initdata unsigned long ino, major, minor, nlink;
123static __initdata mode_t mode; 123static __initdata umode_t mode;
124static __initdata unsigned long body_len, name_len; 124static __initdata unsigned long body_len, name_len;
125static __initdata uid_t uid; 125static __initdata uid_t uid;
126static __initdata gid_t gid; 126static __initdata gid_t gid;
@@ -276,7 +276,7 @@ static int __init maybe_link(void)
276 return 0; 276 return 0;
277} 277}
278 278
279static void __init clean_path(char *path, mode_t mode) 279static void __init clean_path(char *path, umode_t mode)
280{ 280{
281 struct stat st; 281 struct stat st;
282 282
diff --git a/init/main.c b/init/main.c
index 217ed23e9487..415548e808d2 100644
--- a/init/main.c
+++ b/init/main.c
@@ -282,10 +282,6 @@ static int __init unknown_bootoption(char *param, char *val)
282 return 0; 282 return 0;
283} 283}
284 284
285#ifdef CONFIG_DEBUG_PAGEALLOC
286int __read_mostly debug_pagealloc_enabled = 0;
287#endif
288
289static int __init init_setup(char *str) 285static int __init init_setup(char *str)
290{ 286{
291 unsigned int i; 287 unsigned int i;
@@ -469,13 +465,12 @@ asmlinkage void __init start_kernel(void)
469 char * command_line; 465 char * command_line;
470 extern const struct kernel_param __start___param[], __stop___param[]; 466 extern const struct kernel_param __start___param[], __stop___param[];
471 467
472 smp_setup_processor_id();
473
474 /* 468 /*
475 * Need to run as early as possible, to initialize the 469 * Need to run as early as possible, to initialize the
476 * lockdep hash: 470 * lockdep hash:
477 */ 471 */
478 lockdep_init(); 472 lockdep_init();
473 smp_setup_processor_id();
479 debug_objects_early_init(); 474 debug_objects_early_init();
480 475
481 /* 476 /*
@@ -597,7 +592,6 @@ asmlinkage void __init start_kernel(void)
597 } 592 }
598#endif 593#endif
599 page_cgroup_init(); 594 page_cgroup_init();
600 enable_debug_pagealloc();
601 debug_objects_mem_init(); 595 debug_objects_mem_init();
602 kmemleak_init(); 596 kmemleak_init();
603 setup_per_cpu_pageset(); 597 setup_per_cpu_pageset();