MDZ_clock_monitor

LocalePresentation string
en-GBClock rate monitoring

Overview

M8M currently pulls device clock rates from the driver. This is basically a nominal clock rate not reacting to any state.
With thermal management becoming more and more advanced, devices can throttle when overloaded or self-overclock on certain situations.

This extension allows a finer, real-time polling of clock values for better understanding of hardware dynamics. It is especially useful in conjunction with temperature monitoring.

Interactions with other extensions

If MDZ_long_term_stats is supported then a new stream is defined with name clockRate.
A new sample is generated every time at least one of the supported devices signals a clock rate change of at least 1 Mhz.
The value type will have the following form:
{
    device: [D0, D1, ... , DN-1],
    clock: [R0, R1, ... , RN-1]
}

More information about Di values can be inferred using listClocks.

Configuration file additions

A new value clockPollingInterval is added. Valid values are unsigned integers, representing the number of seconds between successive clock rate readings. Default value is 0, meaning monitoring is disabled.
If a system does not contain at least one device exporting at least one readable clock rate, the extension will fail to start at initialization. In this case, the extension token will not be produced in the extension string.

New common commands

None.

New monitor commands

listClocks

Parameters: none.

Purpose: enumerate all available clock rates and give informations regarding usage.

Reply: an array containing as many entries as readable clocks, each entry is in the following form:
{
    presentation: <string>,
    processorIndex: <uint>,
    type: <string>,
}

The field processorIndex is optional. If specified, the clock referres to a specific compute device regardless the device itself is used or not. The index is the very same linear-index to be used by standard commands.
The field type gives an hint about clock usage. It can be "memory", "chip" or "unknown".

Push: not allowed.

probeClock

Parameters: an array of unsigned integers being the index of the clock to query.

Purpose: retrieve current clock rate.

Reply: an array containing as many entries as request. Each entry is an integer representing device current clock in MegaHertz.

Notes:

  1. implementations are free to actually poll the clocks or report the last known clock;
  2. when MDZ_long_term_stats is supported, a sample can be produced by iterating on all available clocks and adding them to the lists whatever the measurement is different.

Push: allowed, but no more than one.

New admin commands

None.

Issues

None.