Skip to content

Commit

Permalink
F #6185: Support huge pages without CPU pinning
Browse files Browse the repository at this point in the history
Ensure that OpenNebula will: configure the VM with CPU affinity to the auto-selected NUMA node

Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
(cherry picked from commit c6adde2)
(cherry picked from commit a456c81)
  • Loading branch information
feldsam authored and rsmontero committed Dec 11, 2024
1 parent 983d797 commit a68e0a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vmm/LibVirtDriverKVM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,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;

Expand All @@ -163,9 +164,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())
{
Expand Down

0 comments on commit a68e0a7

Please sign in to comment.