Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-26 Thread Marcelo Tosatti
On Wed, May 24, 2023 at 04:53:49PM +0200, Anthony Harivel wrote: > set=UTF-8 > Status: RO > Content-Length: 24102 > Lines: 667 > > Marcelo Tosatti, May 19, 2023 at 20:28: > > Hi Marcelo, > > > > > > +/* Assuming those values are the same accross physical > > > > > system/packages */ > > > >

Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-24 Thread Anthony Harivel
Marcelo Tosatti, May 19, 2023 at 20:28: Hi Marcelo, > > > > +/* Assuming those values are the same accross physical > > > > system/packages */ > > > > +maxcpus = get_maxcpus(0); /* Number of CPUS per packages */ > > > > +maxpkgs = numa_max_node(); /* Number of Packages on the system

Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-19 Thread Marcelo Tosatti
Hi Anthony, On Thu, May 18, 2023 at 04:26:51PM +0200, Anthony Harivel wrote: > Marcelo Tosatti, May 17, 2023 at 17:43: > > Hi Marcelo, > > > On Wed, May 17, 2023 at 03:07:30PM +0200, Anthony Harivel wrote: > > diff --git a/target/i386/cpu.h b/target/i386/cpu.h > > > index 8504aaac6807..14f9c290

Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-19 Thread Anthony Harivel
Philippe Mathieu-Daudé, May 19, 2023 at 13:32: Hi Philippe, > > +/* > > + * Package statistic > > + * @ e_start: package energy counter before the sleep > > + * @ e_end: package energy counter after the sleep > > + * @ e_delta: delta of package energy counter > > + * @ e_ratio: store the energy r

Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-19 Thread Philippe Mathieu-Daudé
Hi Anthony, On 17/5/23 15:07, Anthony Harivel wrote: Starting with the "Sandy Bridge" generation, Intel CPUs provide a RAPL interface (Running Average Power Limit) for advertising the accumulated energy consumption of various power domains (e.g. CPU packages, DRAM, etc.). The consumption is rep

Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-18 Thread Anthony Harivel
Marcelo Tosatti, May 17, 2023 at 17:43: Hi Marcelo, > On Wed, May 17, 2023 at 03:07:30PM +0200, Anthony Harivel wrote: > diff --git a/target/i386/cpu.h b/target/i386/cpu.h > > index 8504aaac6807..14f9c2901680 100644 > > --- a/target/i386/cpu.h > > +++ b/target/i386/cpu.h > > @@ -396,6 +396,10 @@

Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu

2023-05-17 Thread Marcelo Tosatti
On Wed, May 17, 2023 at 03:07:30PM +0200, Anthony Harivel wrote: > Starting with the "Sandy Bridge" generation, Intel CPUs provide a RAPL > interface (Running Average Power Limit) for advertising the accumulated > energy consumption of various power domains (e.g. CPU packages, DRAM, > etc.). > > T