← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1635674] [NEW] 'hw:cpu_thread_policy=isolate' is not accounted properly on non-HT hosts

 

Public bug reported:

If an instance with 'hw:cpu_thread_policy=isolate' is scheduled on a
non-HT host, the pinned pCPUs are not properly accounted for.  This can
lead to multiple instances running on the same pCPUs

The problem is that in LibvirtDriver._get_host_numa_topology() when
calculating the NUMACell.siblings field we filter out single cpus.  On a
non-HT host this means that NUMACell.siblings is an empty list.

Later when _update_usage() runs it ends up eventually running
NUMACell.pin_cpus_with_siblings().  This contains the following code:

    def pin_cpus_with_siblings(self, cpus):
        pin_siblings = set()
        for sib in self.siblings:
            if cpus & sib:
                pin_siblings.update(sib)
        self.pin_cpus(pin_siblings)

Since "self.siblings" is empty, we end up calling self.pin_cpus() with
an empty list, which means that we don't update self.pinned_cpus.

Stephen Finucane has suggested the correct fix might be to leave single
pCPUs in the NUMACell.siblings field.  This needs to be verified to make
sure that it doesn't cause other problems.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: compute

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1635674

Title:
  'hw:cpu_thread_policy=isolate' is not accounted properly on non-HT
  hosts

Status in OpenStack Compute (nova):
  New

Bug description:
  If an instance with 'hw:cpu_thread_policy=isolate' is scheduled on a
  non-HT host, the pinned pCPUs are not properly accounted for.  This
  can lead to multiple instances running on the same pCPUs

  The problem is that in LibvirtDriver._get_host_numa_topology() when
  calculating the NUMACell.siblings field we filter out single cpus.  On
  a non-HT host this means that NUMACell.siblings is an empty list.

  Later when _update_usage() runs it ends up eventually running
  NUMACell.pin_cpus_with_siblings().  This contains the following code:

      def pin_cpus_with_siblings(self, cpus):
          pin_siblings = set()
          for sib in self.siblings:
              if cpus & sib:
                  pin_siblings.update(sib)
          self.pin_cpus(pin_siblings)

  Since "self.siblings" is empty, we end up calling self.pin_cpus() with
  an empty list, which means that we don't update self.pinned_cpus.

  Stephen Finucane has suggested the correct fix might be to leave
  single pCPUs in the NUMACell.siblings field.  This needs to be
  verified to make sure that it doesn't cause other problems.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1635674/+subscriptions


Follow ups