summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/registration/views
diff options
context:
space:
mode:
Diffstat (limited to 'windriver/titanium_cloud/registration/views')
-rw-r--r--windriver/titanium_cloud/registration/views/registration.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/windriver/titanium_cloud/registration/views/registration.py b/windriver/titanium_cloud/registration/views/registration.py
index b3b2f006..de2dd334 100644
--- a/windriver/titanium_cloud/registration/views/registration.py
+++ b/windriver/titanium_cloud/registration/views/registration.py
@@ -210,8 +210,20 @@ class Registry(newton_registration.Registry):
hugepages_capability['version'] = 'v1'
hugepages_capability['attributes'] = []
- hugepages_capability['attributes'].append({'hpa-attribute-key': 'memoryPageSize',
- 'hpa-attribute-value':{'value': str(extra_specs['hw:mem_page_size'])}})
+ if extra_specs['hw:mem_page_size'] == 'large':
+ hugepages_capability['attributes'].append({'hpa-attribute-key': 'memoryPageSize',
+ 'hpa-attribute-value':{'value': '2',
+ 'unit': 'MB'}})
+ elif extra_specs['hw:mem_page_size'] == 'small':
+ hugepages_capability['attributes'].append({'hpa-attribute-key': 'memoryPageSize',
+ 'hpa-attribute-value':{'value': '4',
+ 'unit': 'KB'}})
+ elif extra_specs['hw:mem_page_size'] == 'any':
+ self._logger.info("Currently HPA feature memoryPageSize did not support 'any' page!!")
+ else :
+ hugepages_capability['attributes'].append({'hpa-attribute-key': 'memoryPageSize',
+ 'hpa-attribute-value':{'value': str(extra_specs['hw:mem_page_size']),
+ 'unit': 'KB'}})
return hugepages_capability
def _get_numa_capabilities(self, extra_specs):