[openstack-dev] Host CPU feature exposure
Dugger, Donald D
donald.d.dugger at intel.com
Fri Jan 11 21:03:36 UTC 2013
Feature flags: true, x86 is the only CPU with CPUID feature flags but other architectures do have optional features, e.g. PPC CPUs potentially have AltiVec instructions and ARMs could have NEON instructions. I would hope that an ARM compute node would report the presence of NEON instructions by sending a feature string like `neon' to the scheduler. An x86 node would use the string `sse2' while an ARM node would use `neon' but, in all cases, the compute nodes would send their feature capabilities up to the scheduler.
Note that, currently, we already send feature capability strings from the compute nodes to the scheduler. The biggest problem is that we only list some of the features, I'd like to explicitly list all of them.
Aggregates: We could do it that way but that seems cumbersome, labor intensive and error prone. Creating a new flavor for a different set of capabilities would require an operator to consider potentially 1000s of compute nodes to identify which ones have the appropriate features and then manually add them to a new aggregate. It would be so much easier to just define a new flavor with an `extra_spec' that does the appropriate comparison on the features.
"Censeo Toto nos in Kansa esse decisse." - D. Gale
From: Russell Bryant [mailto:rbryant at redhat.com]
Sent: Friday, January 11, 2013 1:17 PM
To: OpenStack Development Mailing List
Cc: Dugger, Donald D; Daniel P. Berrange
Subject: Re: [openstack-dev] Host CPU feature exposure
On 01/11/2013 02:42 PM, Dugger, Donald D wrote:
> I'm trying carefully not to specify CPUID feature bits since, as you say, that would be x86 specific. What I'm looking for is the ability to define platform capabilities and then be able to schedule an instance on a platform that supports specific capabilities. Currently the compute nodes are only exposing CPU feature bits but I would definitely like to extend this to report other capabilities (things like the ability to directly assign SR/IOV devices come to mind although there are a lot of issues that would need to be addressed before we can truly support that). I'm assuming that other architectures, like PPC or ARM, also have different capabilities and these capabilities should be reported to the scheduler just like in the x86 case.
Dan has mentioned a few times that non-x86 CPUs do *not* have feature flags.
If all you're trying to do is have a way to define that a set of hosts
has some capability and then be able to schedule to that set of hosts,
you can do this manually using host aggregates.
Create a host aggregate called 'foo' that contains all of the hosts that
have some set of features you care about. Use metadata on the host
aggregate to define the features that are supported.
Define an instance type with extra_specs. The extra_specs should
contain key/value pairs that match up with the host aggregate metadata
defined above. This is a list of features that must be provided for an
aggregate of hosts to be considered during scheduling.
There is a scheduler filter that mashes these together:
More information about the OpenStack-dev