powercap / raplcap

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

[raplcap-libmsr] Can't set power value separately on power planes that haven’t been enabled before when seconds are not also set #2

Closed connorimes closed 4 years ago

connorimes commented 7 years ago

This is a weird issue that we won't likely try to do anything to fix. It's probably a bug in libmsr, and they have removed support for PP0 and PP1 power planes.

Note entirely sure what versions of libmsr this affects. Based on my poorly written notes about this, it seem like the problem is that both the watts and seconds fields have to be set when a zone hasn't been enabled before. libmsr returns seconds=0 when we read before setting a new watts value in isolation, so we’re trying to set seconds=0 if the raplcap user didn't explicitly request a positive seconds value. The problem is exacerbated by not being able to enable the zone prior to setting values. Perhaps we'd have to set values twice?

I noted an error like:

Error: <libmsr> Invalid bit field values: calc_rapl_bits(): Seconds value is too large: (null):/local/third-party-tools/libmsr/src/msr_rapl.c::440
connorimes commented 4 years ago

libmsr support was removed in 6c62b68. Closing this issue.