mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-06 07:04:45 +09:00
F #6185: Support huge pages without CPU pinning
Ensure that OpenNebula will: configure the VM with CPU affinity to the auto-selected NUMA node Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
This commit is contained in:
1 parent
725337ea5e
commit
c6adde2fca
1 file changed
+3
-1
@@ -174,6 +174,7 @@ static void pin_cpu(ofstream& file, std::string& emulator_cpus,
|
||||
|
||||
unsigned int vcpu_id = 0;
|
||||
int affinity = -1;
|
||||
unsigned int hpsz = 0;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
@@ -185,9 +186,10 @@ static void pin_cpu(ofstream& file, std::string& emulator_cpus,
|
||||
pp = HostShare::str_to_pin_policy(pp_s);
|
||||
|
||||
topology->vector_value("NODE_AFFINITY", affinity);
|
||||
topology->vector_value("HUGEPAGE_SIZE", hpsz);
|
||||
}
|
||||
|
||||
if ( pp == HostShare::PP_NONE && affinity == -1)
|
||||
if ( pp == HostShare::PP_NONE && affinity == -1 && hpsz == 0)
|
||||
{
|
||||
if (!emulator_cpus.empty())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user