[pve-devel] [PATCH] memory hotplug patch v6
Dietmar Maurer
dietmar at proxmox.com
Wed Jan 21 08:24:23 CET 2015
> I think we can also add numa nodes in the mapping,
> like this;
>
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $dimm_id = 0;
> my $current_size = 0;
> my $dimm_size = 128;
> my $sockets = 4;
>
> my $node = 0;
>
> for (my $j = 0; $j < 16; $j++) {
> for (my $i = 0; $i < 16; $i++) {
> my $name = "dimm${dimm_id}";
> $dimm_id++;
> $current_size += $dimm_size;
> my $per = (100*$dimm_size)/$current_size;
> if($node < $sockets-1) {
> $node++;
> }else {
> $node = 0;
> }
> printf ("%10s %10d %10d %10.2f %d\n", $name, $dimm_size,
> $current_size, $per, $node);
> }
> $dimm_size *= 2;
> }
Assuming that each socket defines a separate NUMA node? I thought
we can do:
$node = $i % $number_of_numa_nodes;
More information about the pve-devel
mailing list