From: Thomas Renninger <trenn@suse.de>
To: " Natarajan, Janakarajan " <Janakarajan.Natarajan@amd.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Pu Wen <puwen@hygon.com>, Shuah Khan <shuah@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kate Stewart <kstewart@linuxfoundation.org>,
Allison Randal <allison@lohutok.net>,
Richard Fontana <rfontana@redhat.com>,
Thomas Renninger <trenn@suse.com>, Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH 1/2] Modify cpupower to schedule itself on cores it is reading MSRs from
Date: Fri, 27 Sep 2019 23:48:16 +0200 [thread overview]
Message-ID: <4340017.MFpoU6RDpq@c100> (raw)
In-Reply-To: <9f94bb60-4be2-4303-54de-f50bdd7cb3e6@amd.com>
On Friday, September 27, 2019 6:07:56 PM CEST Natarajan, Janakarajan wrote:
> On 9/18/2019 11:34 AM, Natarajan, Janakarajan wrote:
> > This is advantageous because an IPI is not generated when a read_msr() is
> > executed on the local logical CPU thereby reducing the chance of having
> > APERF and MPERF being out of sync.
> > + if (sched_setaffinity(getpid(), sizeof(set), &set) == -1) {
> > + dprint("Could not migrate to cpu: %d\n", cpu);
> > + return 1;
On a 80 core cpu the process would be pushed around through the
system quite a lot.
This might affect what you are measuring or the other measure values?
Otherwise it's the kernel's MSR read only, not the whole cpupower process,
right? No idea about the exact overhead, though. Others in CC list should
know.
Afaik msr reads through msr module should be avoided anyway?
Those which are worth it are abstracted through sysfs nowadays?
For aperf/mperf it might make sense to define a sysfs file where you
can read both, as this is what you always need?
It would take a while, but could be a longterm solution which is also
usable in secure boot or without msr module case.
Thomas
next prev parent reply other threads:[~2019-09-27 21:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 16:34 [PATCH 1/2] Modify cpupower to schedule itself on cores it is reading MSRs from Natarajan, Janakarajan
2019-09-18 16:34 ` [PATCH 2/2] Update cpupower to use the RDPRU instruction Natarajan, Janakarajan
2019-09-27 16:07 ` [PATCH 1/2] Modify cpupower to schedule itself on cores it is reading MSRs from Natarajan, Janakarajan
2019-09-27 21:48 ` Thomas Renninger [this message]
2019-10-02 14:45 ` Natarajan, Janakarajan
2019-10-05 12:40 ` Thomas Renninger
2019-10-07 21:11 ` Natarajan, Janakarajan
2019-10-10 11:22 ` Thomas Renninger
2019-10-11 16:58 ` Natarajan, Janakarajan
2019-09-27 18:59 ` shuah
2019-09-30 15:34 ` Natarajan, Janakarajan
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=4340017.MFpoU6RDpq@c100 \
--to=trenn@suse.de \
--cc=Janakarajan.Natarajan@amd.com \
--cc=allison@lohutok.net \
--cc=bp@suse.de \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=puwen@hygon.com \
--cc=rfontana@redhat.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=trenn@suse.com \
/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).