From: "Anthony Harivel" <aharivel@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org, pbonzini@redhat.com, mtosatti@redhat.com
Subject: Re: [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu
Date: Fri, 19 May 2023 14:30:29 +0200 [thread overview]
Message-ID: <CSQ97MRMICF6.5KCQEVGSYKFW@fedora> (raw)
In-Reply-To: <d6118a9c-1e3f-4c29-520e-26562bbac600@linaro.org>
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 ratio of non-vCPU thread
> > + * @ nb_vcpu: number of vCPU running on this package
> > + */
> > +struct packge_energy_stat {
>
> "package"
My bad..
This will be corrected.
>
> > + uint64_t e_start;
> > + uint64_t e_end;
> > + uint64_t e_delta;
> > + uint64_t e_ratio;
> > + unsigned int nb_vcpu;
> > +};
> > +
> > +typedef struct thread_stat thread_stat;
> > +typedef struct packge_energy_stat package_energy_stat;
> > +
> > +uint64_t read_msr(uint32_t reg, unsigned int cpu_id);
> > +void delta_ticks(thread_stat *thd_stat, int i);
> > +unsigned int get_maxcpus(unsigned int package_num);
> > +int read_thread_stat(struct thread_stat *thread, int pid, int index);
> > +pid_t *get_thread_ids(pid_t pid, int *num_threads);
> > +double get_ratio(package_energy_stat *pkg_stat,
> > + thread_stat *thd_stat,
> > + int maxticks, int i);
>
> Would prefixing these declarations with 'vmsr_' provide
> a clearer API? Otherwise, maybe this isn't the best header
> to declare them.
I agree with you this lack the prefixing you mention for better API clarity.
I will correct that.
Thanks !
> > +
> > +#endif /* VMSR_ENERGY_H */
prev parent reply other threads:[~2023-05-19 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 13:07 [RFC PATCH] Add support for RAPL MSRs in KVM/Qemu Anthony Harivel
2023-05-17 15:43 ` Marcelo Tosatti
2023-05-18 14:26 ` Anthony Harivel
2023-05-19 18:28 ` Marcelo Tosatti
2023-05-24 14:53 ` Anthony Harivel
2023-05-26 15:23 ` Marcelo Tosatti
2023-05-19 11:32 ` Philippe Mathieu-Daudé
2023-05-19 12:30 ` Anthony Harivel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CSQ97MRMICF6.5KCQEVGSYKFW@fedora \
--to=aharivel@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).