Multiple copies of kernel code on NUMA?
Posted: Wed Jul 28, 2004 12:28 am
Hi,
I'm re-implementing my paging code, and I'm wondering if it's worth storing the kernel's code in seperate physical pages for each NUMA domain/memory range.
The advantage would be that each CPU would be able to run kernel code faster because it would be using memory that is "closer" to that CPU. The disadvantages would be additional memory usage and that it would be harder to implement (making sure that each address space uses the most appropriate copy of the kernel code).
If I only had one copy of the kernel's code, then one CPU would run faster than the others (if the kernel used physical pages from only one NUMA memory range). Alternatively I could mix pages from all NUMA memory ranges so that each CPU would run each kernel function at different speeds (depending on which functions use pages from which memory ranges).
I also have similar problems with the kernel's data, which must use the same physical memory for all CPUs.
My kernel will end up being roughly 128 Kb, so I'd end up using an extra 128 Kb on a 2 way computer, 384 Kb on a 4 way computer, etc.
Anyone have any thoughts?
Cheers,
Brendan
I'm re-implementing my paging code, and I'm wondering if it's worth storing the kernel's code in seperate physical pages for each NUMA domain/memory range.
The advantage would be that each CPU would be able to run kernel code faster because it would be using memory that is "closer" to that CPU. The disadvantages would be additional memory usage and that it would be harder to implement (making sure that each address space uses the most appropriate copy of the kernel code).
If I only had one copy of the kernel's code, then one CPU would run faster than the others (if the kernel used physical pages from only one NUMA memory range). Alternatively I could mix pages from all NUMA memory ranges so that each CPU would run each kernel function at different speeds (depending on which functions use pages from which memory ranges).
I also have similar problems with the kernel's data, which must use the same physical memory for all CPUs.
My kernel will end up being roughly 128 Kb, so I'd end up using an extra 128 Kb on a 2 way computer, 384 Kb on a 4 way computer, etc.
Anyone have any thoughts?
Cheers,
Brendan