Commit Graph

3 Commits

Author SHA1 Message Date
Martin Kletzander
439eaf6399 whitespace clean-ups
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-07-15 14:50:48 +02:00
Daniel P. Berrangé
7b79ee2f78 hostcpu: add support for reporting die_id in NUMA topology
Update the host CPU code to report the die_id in the NUMA topology
capabilities. On systems with multiple dies, this fixes the bug
where CPU cores can't be distinguished:

 <cpus num='12'>
   <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
   <cpu id='1' socket_id='0' core_id='1' siblings='1'/>
   <cpu id='2' socket_id='0' core_id='0' siblings='2'/>
   <cpu id='3' socket_id='0' core_id='1' siblings='3'/>
 </cpus>

Notice how core_id is repeated within the scope of the same socket_id.

It now reports

 <cpus num='12'>
   <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
   <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
   <cpu id='2' socket_id='0' die_id='1' core_id='0' siblings='2'/>
   <cpu id='3' socket_id='0' die_id='1' core_id='1' siblings='3'/>
 </cpus>

So core_id is now unique within a (socket_id, die_id) pair.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-16 15:11:55 +00:00
Wang Huaqiang
6af8417415 conf: Introduce RDT monitor host capability
This patch is introducing cache monitor(CMT) to cache and
memory bandwidth monitor(MBM) for monitoring CPU memory
bandwidth.

The host capability of the two monitors is also introduced
in this patch.

For CMT, the host capability is shown like:
  <host>
  ...
    <cache>
      <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'>
        <control granularity='768' min='1536' unit='KiB' type='both' maxAllocs='4'/>
      </bank>
      <monitor level='3' 'reuseThreshold'='270336' maxMonitors='176'>
        <feature name='llc_occupancy'/>
      </monitor>
    </cache>
    ...
  </host>

For MBM, the capability is shown like this:
  <host>
    ...
    <memory_bandwidth>
      <node id='1' cpus='6-11'>
        <control granularity='10' min ='10' maxAllocs='4'/>
      </node>
      <monitor maxMonitors='176'>
        <feature name='mbm_total_bytes'/>
        <feature name='mbm_local_bytes'/>
      </monitor>
    </memory_bandwidth>
    ...
  </host>

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-20 13:06:02 -04:00