Comment 6 for bug 1438238

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/169245
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d6b3156a6c89ddff9b149452df34c4b32c50b6c3
Submitter: Jenkins
Branch: master

commit d6b3156a6c89ddff9b149452df34c4b32c50b6c3
Author: Nikola Dipanov <email address hidden>
Date: Tue Apr 7 20:53:32 2015 +0100

    scheduler: re-calculate NUMA on consume_from_instance

    This patch narrows down the race window between the filter running and
    the consumption of resources from the instance after the host has been
    chosen.

    It does so by re-calculating the fitted NUMA topology just before consuming it
    from the chosen host. Thus we avoid any locking, but also make sure that
    the host_state is kept as up to date as possible for concurrent
    requests, as there is no opportunity for switching threads inside a
    consume_from_instance.

    Several things worth noting:
      * Scheduler being lock free (and thus racy) does not really affect
      resources other than PCI and NUMA topology this badly - this is due
      to complexity of said resources. In order for scheduler decesions to not
      be based on basically guessing, in case of those two we will likely need
      to introduce either locking or special heuristics.

      * There is a lot of repeated code between the 'consume_from_instance'
      method and the actual filters. This situation should really be fixed but
      is out of scope for this bug fix (which is about preventing valid
      requests failing because of races in the scheduler).

    Change-Id: If0c7ad20506c9dddf4dec1eb64c9d6dd4fb75633
    Closes-bug: #1438238