Comment 2 for bug 1751073

Revision history for this message
Kashyap Chamarthy (kashyapc) wrote :

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:

[...]
PERF_EVENTS_CPU_FLAG_MAPPING = {'cmt': 'cmt',
                                'mbml': 'mbm_local',
                                'mbmt': 'mbm_total',
                               }
[...]

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.