Skip to contentSkip to conversation

Kernel Resources & Allocation Order

Linux-ia64 Donny Cooper 2 participants 2 messages Oct 18, 2001

lore
Share & tools
lore
#0 lore raw

Do kernel-parameters (such as, mem=X and maxcpus=N) have an allocation order according to the physical system layout, or even follow any order at all?

For example, if I boot with mem24M and maxcpus=2, will resources come from the low number DIMM and CPU slots. Or is SMP completely random, with no guarantee which resources are allocated. I am aware that you cannot choose which resources to use, but the documentation I have found on this subject is unclear.

Thanks.
-----------------------------------
Donny Cooper
NEC Systems, Inc.
Advanced Technical Computing Center
[email protected]
www.necservers.com
-----------------------------------

#1 lore raw

Hi,

Quoted 4 lines · On Thu, 18 Oct 2001 15:24:08 -0500 "Donny Cooper" <[email protected]>…

Do kernel-parameters (such as, mem=X and maxcpus=N) have an allocation order according to the physical system layout, or
even follow any order at all?

Current IA64 Linux implementation uses ACPI MADT order for limiting cpu number and EFI_MEMMAP order for limiting memory.
The lowest-numberd cpus (except BSP) or the lowest-mapped memory range is allocated.

Quoted 3 lines

For example, if I boot with mem24M and maxcpus=2, will resources come from the low number DIMM and CPU slots. Or is
SMP completely random, with no guarantee which resources are allocated.

ACPI MADT numbering is dependent on firmware implementation (though most platform choose the lowest numberd cpu to come first). Which DIMM is the lowest memory is dependent on hardware (memory-controller or chipset) and firmware (how to program memory controller).

Quoted 2 lines

I am aware that you cannot choose which
resources to use, but the documentation I have found on this subject is unclear.

Rewriting the resource-limiting (maxcpu, maxmem) code, you can control which part of cpu or memory will be used, but which part of cpu/mem corresponds to which part of physical cpu/mem is different from platform to platform.

Regards,

Signature · 1 line
KOCHI Takayoshi <[email protected]/[email protected]>