diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 47 | ||||
-rw-r--r-- | init/do_mounts.c | 70 | ||||
-rw-r--r-- | init/main.c | 3 |
3 files changed, 109 insertions, 11 deletions
diff --git a/init/Kconfig b/init/Kconfig index d742b6fca8d2..fdfd97efe0e0 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -21,6 +21,13 @@ config CONSTRUCTORS | |||
21 | depends on !UML | 21 | depends on !UML |
22 | default y | 22 | default y |
23 | 23 | ||
24 | config HAVE_IRQ_WORK | ||
25 | bool | ||
26 | |||
27 | config IRQ_WORK | ||
28 | bool | ||
29 | depends on HAVE_IRQ_WORK | ||
30 | |||
24 | menu "General setup" | 31 | menu "General setup" |
25 | 32 | ||
26 | config EXPERIMENTAL | 33 | config EXPERIMENTAL |
@@ -64,7 +71,7 @@ config BROKEN_ON_SMP | |||
64 | 71 | ||
65 | config LOCK_KERNEL | 72 | config LOCK_KERNEL |
66 | bool | 73 | bool |
67 | depends on SMP || PREEMPT | 74 | depends on (SMP || PREEMPT) && BKL |
68 | default y | 75 | default y |
69 | 76 | ||
70 | config INIT_ENV_ARG_LIMIT | 77 | config INIT_ENV_ARG_LIMIT |
@@ -332,6 +339,8 @@ config AUDIT_TREE | |||
332 | depends on AUDITSYSCALL | 339 | depends on AUDITSYSCALL |
333 | select FSNOTIFY | 340 | select FSNOTIFY |
334 | 341 | ||
342 | source "kernel/irq/Kconfig" | ||
343 | |||
335 | menu "RCU Subsystem" | 344 | menu "RCU Subsystem" |
336 | 345 | ||
337 | choice | 346 | choice |
@@ -340,6 +349,7 @@ choice | |||
340 | 349 | ||
341 | config TREE_RCU | 350 | config TREE_RCU |
342 | bool "Tree-based hierarchical RCU" | 351 | bool "Tree-based hierarchical RCU" |
352 | depends on !PREEMPT && SMP | ||
343 | help | 353 | help |
344 | This option selects the RCU implementation that is | 354 | This option selects the RCU implementation that is |
345 | designed for very large SMP system with hundreds or | 355 | designed for very large SMP system with hundreds or |
@@ -347,7 +357,7 @@ config TREE_RCU | |||
347 | smaller systems. | 357 | smaller systems. |
348 | 358 | ||
349 | config TREE_PREEMPT_RCU | 359 | config TREE_PREEMPT_RCU |
350 | bool "Preemptable tree-based hierarchical RCU" | 360 | bool "Preemptible tree-based hierarchical RCU" |
351 | depends on PREEMPT | 361 | depends on PREEMPT |
352 | help | 362 | help |
353 | This option selects the RCU implementation that is | 363 | This option selects the RCU implementation that is |
@@ -365,8 +375,22 @@ config TINY_RCU | |||
365 | is not required. This option greatly reduces the | 375 | is not required. This option greatly reduces the |
366 | memory footprint of RCU. | 376 | memory footprint of RCU. |
367 | 377 | ||
378 | config TINY_PREEMPT_RCU | ||
379 | bool "Preemptible UP-only small-memory-footprint RCU" | ||
380 | depends on !SMP && PREEMPT | ||
381 | help | ||
382 | This option selects the RCU implementation that is designed | ||
383 | for real-time UP systems. This option greatly reduces the | ||
384 | memory footprint of RCU. | ||
385 | |||
368 | endchoice | 386 | endchoice |
369 | 387 | ||
388 | config PREEMPT_RCU | ||
389 | def_bool ( TREE_PREEMPT_RCU || TINY_PREEMPT_RCU ) | ||
390 | help | ||
391 | This option enables preemptible-RCU code that is common between | ||
392 | the TREE_PREEMPT_RCU and TINY_PREEMPT_RCU implementations. | ||
393 | |||
370 | config RCU_TRACE | 394 | config RCU_TRACE |
371 | bool "Enable tracing for RCU" | 395 | bool "Enable tracing for RCU" |
372 | depends on TREE_RCU || TREE_PREEMPT_RCU | 396 | depends on TREE_RCU || TREE_PREEMPT_RCU |
@@ -387,9 +411,12 @@ config RCU_FANOUT | |||
387 | help | 411 | help |
388 | This option controls the fanout of hierarchical implementations | 412 | This option controls the fanout of hierarchical implementations |
389 | of RCU, allowing RCU to work efficiently on machines with | 413 | of RCU, allowing RCU to work efficiently on machines with |
390 | large numbers of CPUs. This value must be at least the cube | 414 | large numbers of CPUs. This value must be at least the fourth |
391 | root of NR_CPUS, which allows NR_CPUS up to 32,768 for 32-bit | 415 | root of NR_CPUS, which allows NR_CPUS to be insanely large. |
392 | systems and up to 262,144 for 64-bit systems. | 416 | The default value of RCU_FANOUT should be used for production |
417 | systems, but if you are stress-testing the RCU implementation | ||
418 | itself, small RCU_FANOUT values allow you to test large-system | ||
419 | code paths on small(er) systems. | ||
393 | 420 | ||
394 | Select a specific number if testing RCU itself. | 421 | Select a specific number if testing RCU itself. |
395 | Take the default if unsure. | 422 | Take the default if unsure. |
@@ -634,11 +661,14 @@ config BLK_CGROUP | |||
634 | 661 | ||
635 | Currently, CFQ IO scheduler uses it to recognize task groups and | 662 | Currently, CFQ IO scheduler uses it to recognize task groups and |
636 | control disk bandwidth allocation (proportional time slice allocation) | 663 | control disk bandwidth allocation (proportional time slice allocation) |
637 | to such task groups. | 664 | to such task groups. It is also used by bio throttling logic in |
665 | block layer to implement upper limit in IO rates on a device. | ||
638 | 666 | ||
639 | This option only enables generic Block IO controller infrastructure. | 667 | This option only enables generic Block IO controller infrastructure. |
640 | One needs to also enable actual IO controlling logic in CFQ for it | 668 | One needs to also enable actual IO controlling logic/policy. For |
641 | to take effect. (CONFIG_CFQ_GROUP_IOSCHED=y). | 669 | enabling proportional weight division of disk bandwidth in CFQ seti |
670 | CONFIG_CFQ_GROUP_IOSCHED=y and for enabling throttling policy set | ||
671 | CONFIG_BLK_THROTTLE=y. | ||
642 | 672 | ||
643 | See Documentation/cgroups/blkio-controller.txt for more information. | 673 | See Documentation/cgroups/blkio-controller.txt for more information. |
644 | 674 | ||
@@ -989,6 +1019,7 @@ config PERF_EVENTS | |||
989 | default y if (PROFILING || PERF_COUNTERS) | 1019 | default y if (PROFILING || PERF_COUNTERS) |
990 | depends on HAVE_PERF_EVENTS | 1020 | depends on HAVE_PERF_EVENTS |
991 | select ANON_INODES | 1021 | select ANON_INODES |
1022 | select IRQ_WORK | ||
992 | help | 1023 | help |
993 | Enable kernel support for various performance events provided | 1024 | Enable kernel support for various performance events provided |
994 | by software and hardware. | 1025 | by software and hardware. |
diff --git a/init/do_mounts.c b/init/do_mounts.c index 02e3ca4fc527..42db0551c3aa 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -58,6 +58,62 @@ static int __init readwrite(char *str) | |||
58 | __setup("ro", readonly); | 58 | __setup("ro", readonly); |
59 | __setup("rw", readwrite); | 59 | __setup("rw", readwrite); |
60 | 60 | ||
61 | #ifdef CONFIG_BLOCK | ||
62 | /** | ||
63 | * match_dev_by_uuid - callback for finding a partition using its uuid | ||
64 | * @dev: device passed in by the caller | ||
65 | * @data: opaque pointer to a 36 byte char array with a UUID | ||
66 | * | ||
67 | * Returns 1 if the device matches, and 0 otherwise. | ||
68 | */ | ||
69 | static int match_dev_by_uuid(struct device *dev, void *data) | ||
70 | { | ||
71 | u8 *uuid = data; | ||
72 | struct hd_struct *part = dev_to_part(dev); | ||
73 | |||
74 | if (!part->info) | ||
75 | goto no_match; | ||
76 | |||
77 | if (memcmp(uuid, part->info->uuid, sizeof(part->info->uuid))) | ||
78 | goto no_match; | ||
79 | |||
80 | return 1; | ||
81 | no_match: | ||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | |||
86 | /** | ||
87 | * devt_from_partuuid - looks up the dev_t of a partition by its UUID | ||
88 | * @uuid: 36 byte char array containing a hex ascii UUID | ||
89 | * | ||
90 | * The function will return the first partition which contains a matching | ||
91 | * UUID value in its partition_meta_info struct. This does not search | ||
92 | * by filesystem UUIDs. | ||
93 | * | ||
94 | * Returns the matching dev_t on success or 0 on failure. | ||
95 | */ | ||
96 | static dev_t __init devt_from_partuuid(char *uuid_str) | ||
97 | { | ||
98 | dev_t res = 0; | ||
99 | struct device *dev = NULL; | ||
100 | u8 uuid[16]; | ||
101 | |||
102 | /* Pack the requested UUID in the expected format. */ | ||
103 | part_pack_uuid(uuid_str, uuid); | ||
104 | |||
105 | dev = class_find_device(&block_class, NULL, uuid, &match_dev_by_uuid); | ||
106 | if (!dev) | ||
107 | goto done; | ||
108 | |||
109 | res = dev->devt; | ||
110 | put_device(dev); | ||
111 | |||
112 | done: | ||
113 | return res; | ||
114 | } | ||
115 | #endif | ||
116 | |||
61 | /* | 117 | /* |
62 | * Convert a name into device number. We accept the following variants: | 118 | * Convert a name into device number. We accept the following variants: |
63 | * | 119 | * |
@@ -68,6 +124,8 @@ __setup("rw", readwrite); | |||
68 | * of partition - device number of disk plus the partition number | 124 | * of partition - device number of disk plus the partition number |
69 | * 5) /dev/<disk_name>p<decimal> - same as the above, that form is | 125 | * 5) /dev/<disk_name>p<decimal> - same as the above, that form is |
70 | * used when disk name of partitioned disk ends on a digit. | 126 | * used when disk name of partitioned disk ends on a digit. |
127 | * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the | ||
128 | * unique id of a partition if the partition table provides it. | ||
71 | * | 129 | * |
72 | * If name doesn't have fall into the categories above, we return (0,0). | 130 | * If name doesn't have fall into the categories above, we return (0,0). |
73 | * block_class is used to check if something is a disk name. If the disk | 131 | * block_class is used to check if something is a disk name. If the disk |
@@ -82,6 +140,18 @@ dev_t name_to_dev_t(char *name) | |||
82 | dev_t res = 0; | 140 | dev_t res = 0; |
83 | int part; | 141 | int part; |
84 | 142 | ||
143 | #ifdef CONFIG_BLOCK | ||
144 | if (strncmp(name, "PARTUUID=", 9) == 0) { | ||
145 | name += 9; | ||
146 | if (strlen(name) != 36) | ||
147 | goto fail; | ||
148 | res = devt_from_partuuid(name); | ||
149 | if (!res) | ||
150 | goto fail; | ||
151 | goto done; | ||
152 | } | ||
153 | #endif | ||
154 | |||
85 | if (strncmp(name, "/dev/", 5) != 0) { | 155 | if (strncmp(name, "/dev/", 5) != 0) { |
86 | unsigned maj, min; | 156 | unsigned maj, min; |
87 | 157 | ||
diff --git a/init/main.c b/init/main.c index 94ab488039aa..e59af24a0b7c 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -424,7 +424,6 @@ static void __init setup_command_line(char *command_line) | |||
424 | static __initdata DECLARE_COMPLETION(kthreadd_done); | 424 | static __initdata DECLARE_COMPLETION(kthreadd_done); |
425 | 425 | ||
426 | static noinline void __init_refok rest_init(void) | 426 | static noinline void __init_refok rest_init(void) |
427 | __releases(kernel_lock) | ||
428 | { | 427 | { |
429 | int pid; | 428 | int pid; |
430 | 429 | ||
@@ -556,7 +555,6 @@ asmlinkage void __init start_kernel(void) | |||
556 | 555 | ||
557 | local_irq_disable(); | 556 | local_irq_disable(); |
558 | early_boot_irqs_off(); | 557 | early_boot_irqs_off(); |
559 | early_init_irq_lock_class(); | ||
560 | 558 | ||
561 | /* | 559 | /* |
562 | * Interrupts are still disabled. Do necessary setups, then | 560 | * Interrupts are still disabled. Do necessary setups, then |
@@ -819,7 +817,6 @@ static void run_init_process(const char *init_filename) | |||
819 | * makes it inline to init() and it becomes part of init.text section | 817 | * makes it inline to init() and it becomes part of init.text section |
820 | */ | 818 | */ |
821 | static noinline int init_post(void) | 819 | static noinline int init_post(void) |
822 | __releases(kernel_lock) | ||
823 | { | 820 | { |
824 | /* need to finish all async __init code before freeing the memory */ | 821 | /* need to finish all async __init code before freeing the memory */ |
825 | async_synchronize_full(); | 822 | async_synchronize_full(); |