This issue is filed mostly to document the idea, although it is unlikely to be implemented.
Currently there is only one way to set a power value to 0, however undesirable that may be. A user must specify a really small watts (still > DBL_EPSILON) value that is ultimately rounded down when converting to microwatts or truncated at the bit-level when writing to MSRs. We might consider allowing watts=0 and only ignoring the watts and seconds fields when they are negative. This would require, in the very least:
A silent interface change (resulting in a major version bump and loss of backward compatibility)!
An additional burden on the user to set negative values (not as convenient as 0)
Changing interface description of and implementations of raplcap_set_limits(...)
Updates to rapl-configure (possibly with the addition of a -e/--enabled flag instead of accepting negative values. We note, however, that not all implementations support direct enabling/disabling, e.g., raplcap-libmsr.
Some interfaces might support seconds=0, but in reality this would result in the smallest possible time window due to how the bit values for time windows in MSRs are interpreted.
This issue is filed mostly to document the idea, although it is unlikely to be implemented.
Currently there is only one way to set a power value to 0, however undesirable that may be. A user must specify a really small
watts
(still> DBL_EPSILON
) value that is ultimately rounded down when converting to microwatts or truncated at the bit-level when writing to MSRs. We might consider allowingwatts=0
and only ignoring thewatts
andseconds
fields when they are negative. This would require, in the very least:raplcap_set_limits(...)
rapl-configure
(possibly with the addition of a-e/--enabled
flag instead of accepting negative values. We note, however, that not all implementations support direct enabling/disabling, e.g.,raplcap-libmsr
.Some interfaces might support
seconds=0
, but in reality this would result in the smallest possible time window due to how the bit values for time windows in MSRs are interpreted.