qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix energy calcultation in RAPL MSR
@ 2024-08-07 12:43 Anthony Harivel
  2024-08-07 12:43 ` [PATCH 1/1] target/i386: Fix arguments for vmsr_read_thread_stat() Anthony Harivel
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Harivel @ 2024-08-07 12:43 UTC (permalink / raw)
  To: pbonzini; +Cc: qemu-devel, Anthony Harivel

Hi Paolo,

The value reported by the calculation was looking very wrong to me.

This should fix it for good.

Calculated value appears now way more accurate from what is expected 
from the feature:

with "-smp 4":

[...]
# modprobe intel_rapl_msr.ko
intel_rapl_common: Found RAPL domain package
intel_rapl_common: found 1 domains on package-0
intel_rapl_common: Core CPU package-0:package energy=61035pJ, time=976us, power=125000uW
intel_rapl_common: update package-0 domain package data
# 
# 
# 
# cat /sys/class/powercap/intel-rapl:0/energy_uj 
303160
# cat /sys/class/powercap/intel-rapl:0/energy_uj 
325621
# cat /sys/class/powercap/intel-rapl:0/energy_uj 
325621
# cat /sys/class/powercap/intel-rapl:0/energy_uj 
357237
# cat /sys/class/powercap/intel-rapl:0/energy_uj 
357237
# cat /sys/class/powercap/intel-rapl:0/energy_uj 
388792
[...]

Tested with several SMP architecture.
(i.e -smp 4 / -smp 8,sockets=2,dies=1 / -smp 8,sockets=4,dies=2 )

Anthony Harivel (1):
  target/i386: Fix arguments for vmsr_read_thread_stat()

 target/i386/kvm/kvm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.45.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-09  9:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 12:43 [PATCH 0/1] Fix energy calcultation in RAPL MSR Anthony Harivel
2024-08-07 12:43 ` [PATCH 1/1] target/i386: Fix arguments for vmsr_read_thread_stat() Anthony Harivel
2024-08-09 10:10   ` Zhao Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).