Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185163
b: refs/heads/master
c: 2b633e3
h: refs/heads/master
i:
  185161: 64ee069
  185159: 4145c3f
v: v3
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Feb 18, 2010
1 parent 3c78f63 commit e0c4486
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6738762d73a237ec322b04d8b9d55c8fd5d84713
refs/heads/master: 2b633e3fac5efada088b57d31e65401f22bcc18f
6 changes: 6 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,12 @@ and is between 256 and 4096 characters. It is defined in the file
purges which is reported from either PAL_VM_SUMMARY or
SAL PALO.

nr_cpus= [SMP] Maximum number of processors that an SMP kernel
could support. nr_cpus=n : n >= 1 limits the kernel to
supporting 'n' processors. Later in runtime you can not
use hotplug cpu feature to put more cpu back to online.
just like you compile the kernel NR_CPUS=n

nr_uarts= [SERIAL] maximum number of UARTs to be registered.

numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,8 @@ __init void prefill_possible_map(void)

possible = available_cpus + additional_cpus;

if (possible > NR_CPUS)
possible = NR_CPUS;
if (possible > nr_cpu_ids)
possible = nr_cpu_ids;

printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
possible, max((possible - available_cpus), 0));
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,11 +1213,12 @@ __init void prefill_possible_map(void)

total_cpus = max_t(int, possible, num_processors + disabled_cpus);

if (possible > CONFIG_NR_CPUS) {
/* nr_cpu_ids could be reduced via nr_cpus= */
if (possible > nr_cpu_ids) {
printk(KERN_WARNING
"%d Processors exceeds NR_CPUS limit of %d\n",
possible, CONFIG_NR_CPUS);
possible = CONFIG_NR_CPUS;
possible, nr_cpu_ids);
possible = nr_cpu_ids;
}

printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ int __init acpi_numa_init(void)
/* SRAT: Static Resource Affinity Table */
if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) {
acpi_table_parse_srat(ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY,
acpi_parse_x2apic_affinity, NR_CPUS);
acpi_parse_x2apic_affinity, nr_cpu_ids);
acpi_table_parse_srat(ACPI_SRAT_TYPE_CPU_AFFINITY,
acpi_parse_processor_affinity, NR_CPUS);
acpi_parse_processor_affinity, nr_cpu_ids);
ret = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
acpi_parse_memory_affinity,
NR_NODE_MEMBLKS);
Expand Down
14 changes: 14 additions & 0 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@ static int __init nosmp(char *str)

early_param("nosmp", nosmp);

/* this is hard limit */
static int __init nrcpus(char *str)
{
int nr_cpus;

get_option(&str, &nr_cpus);
if (nr_cpus > 0 && nr_cpus < nr_cpu_ids)
nr_cpu_ids = nr_cpus;

return 0;
}

early_param("nr_cpus", nrcpus);

static int __init maxcpus(char *str)
{
get_option(&str, &setup_max_cpus);
Expand Down

0 comments on commit e0c4486

Please sign in to comment.