powercap / raplcap

RAPL power capping C interface with multiple implementations
BSD 3-Clause "New" or "Revised" License
45 stars 9 forks source link

Supporting power limit = 0 #3

Open connorimes opened 7 years ago

connorimes commented 7 years ago

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:

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.