An update on the above point of "Although libvirt supports many events, OpenStack only supports the 'cmt', 'mbmt' and 'mbml' perf events" -- which is wrong.
After auditing the code, Nova supports more than just those three Intel Cache Monitoring Technology based events ('cmt', 'mbmt' and 'mbml'), as the `enabled_perf_events` config attributes takes a string list.
Details:
(Looking at Git/master; `git describe`: 17.0.0.0rc1-648-g8b081453c5)
But when you look at the _supported_perf_event() method in libvirt/driver.py,
4816 def _supported_perf_event(self, event, cpu_features):
4817
4818 libvirt_perf_event_name = LIBVIRT_PERF_EVENT_PREFIX + event.upper()
4819
4820 if not hasattr(libvirt, libvirt_perf_event_name):
4821 LOG.warning("Libvirt doesn't support event type %s.", event)
4822 return False
4823
4824 if (event in PERF_EVENTS_CPU_FLAG_MAPPING
4825 and PERF_EVENTS_CPU_FLAG_MAPPING[event] not in cpu_features):
4826 LOG.warning("Host does not support event type %s.", event)
4827 return False
4828
4829 return True
We will skip the `in cpu_features` check (line 4825) if an event is not in the PERF_EVENTS_CPU_FLAG_MAPPING list.
So maybe we can't delete this feature from Nova wholesale. But we can question if anyone uses what's left.
An update on the above point of "Although libvirt supports many events, OpenStack only supports the 'cmt', 'mbmt' and 'mbml' perf events" -- which is wrong.
After auditing the code, Nova supports more than just those three Intel Cache Monitoring Technology based events ('cmt', 'mbmt' and 'mbml'), as the `enabled_ perf_events` config attributes takes a string list.
Details:
(Looking at Git/master; `git describe`: 17.0.0. 0rc1-648- g8b081453c5)
In the nova/virt/ libvirt/ driver. py, we see:
[...] CPU_FLAG_ MAPPING = {'cmt': 'cmt',
'mbml' : 'mbm_local',
'mbmt' : 'mbm_total',
}
PERF_EVENTS_
[...]
But when you look at the _supported_ perf_event( ) method in libvirt/driver.py,
4816 def _supported_ perf_event( self, event, cpu_features): perf_event_ name = LIBVIRT_ PERF_EVENT_ PREFIX + event.upper() perf_event_ name): "Libvirt doesn't support event type %s.", event) CPU_FLAG_ MAPPING CPU_FLAG_ MAPPING[ event] not in cpu_features):
4817
4818 libvirt_
4819
4820 if not hasattr(libvirt, libvirt_
4821 LOG.warning(
4822 return False
4823
4824 if (event in PERF_EVENTS_
4825 and PERF_EVENTS_
4826 LOG.warning("Host does not support event type %s.", event)
4827 return False
4828
4829 return True
We will skip the `in cpu_features` check (line 4825) if an event is not in the PERF_EVENTS_ CPU_FLAG_ MAPPING list.
So maybe we can't delete this feature from Nova wholesale. But we can question if anyone uses what's left.