]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (amd_energy) optimize accumulation interval
authorNaveen Krishna Chatradhi <nchatrad@amd.com>
Tue, 29 Sep 2020 10:53:20 +0000 (16:23 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 30 Sep 2020 05:06:39 +0000 (22:06 -0700)
commit3ee2fa19b548cdf65fdcefa55d00620290b36a06
treee93d5993d2a2e6f35c14278a06c96e67326f9c55
parent36fc4fa66819d4a3cc8c5ff5511baa4dfaf9a68b
hwmon: (amd_energy) optimize accumulation interval

On a system with course grain resolution of energy unit (milli J) the
accumulation thread can be executed less frequently than on the system
with fine grain resolution(micro J).

This patch sets the accumulation thread interval to an optimum value
calculated based on the (energy unit) resolution supported by the
hardware (assuming a peak wattage of 240W).

Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20200929105322.8919-3-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/amd_energy.c