From: Thomas Renninger <trenn@suse.com>
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>,
Borislav Petkov <bp@suse.de>
Subject: Re: [PATCHv2 2/3] cpupower: mperf_monitor: Introduce per_cpu_schedule flag
Date: Fri, 25 Oct 2019 12:39:36 +0200 [thread overview]
Message-ID: <24194241.SRZ5kbjNg7@skinner.arch.suse.de> (raw)
In-Reply-To: <bb4b0e4137b62651b9d028925fa8f09ca5fbd989.1570819652.git.Janakarajan.Natarajan@amd.com>
Hi Natarajan,
sorry for answering that late.
I post on top as it doesn't fit to the patch context:
While I like the 2 other patches, especially the first preparing for
a generic "ensure to always run on the measured CPU at measure time"
interface..., this patch does make use of it in a very static manner.
I then tried to get this more generic..., without any outcome for now.
If someone likes to play with this, my idea would be:
- the monitors need cpu_start() and cpu_stop() callbacks to register
- either start(), stop() and/or cpu_start(), cpu_stop() callbacks have to
be provided by a monitor.
- current behavior is only start/stop which means the whole per_cpu logic
resides inside the monitor
- if cpu_start/cpu_stop is provided, iterating over all cpus is done in
fork_it and general start/stop functions are an optionally entry point
before and after the per_cpu calls.
Then the cpu binding can be done from outside.
Another enhancement could be then to fork as many processes as there are CPUs
in case of per_cpu_schedule (or an extra param/flag) and then:
- Bind these forked processes to each cpu.
- Execute start measures via the forked processes on each cpu
- Execute test executable (which runs in yet another fork as done already)
- Execute stop measures via the forked processes on each cpu
This should be ideal environment to not interfere with the tested executable.
It would also allow a nicer program structure.
Just some ideas. But no time right now to look deeper into this.
I'll ack on the first summarizing commit message.
Thomas
next prev parent reply other threads:[~2019-10-25 10:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 19:37 [PATCHv2 0/3] Update cpupower and make it more accurate Natarajan, Janakarajan
2019-10-11 19:37 ` [PATCHv2 1/3] cpupower: Move needs_root variable into a sub-struct Natarajan, Janakarajan
2019-10-11 19:37 ` [PATCHv2 2/3] cpupower: mperf_monitor: Introduce per_cpu_schedule flag Natarajan, Janakarajan
2019-10-25 10:39 ` Thomas Renninger [this message]
2019-10-25 15:33 ` shuah
2019-10-28 16:37 ` Natarajan, Janakarajan
2019-10-11 19:37 ` [PATCHv2 3/3] cpupower: mperf_monitor: Update cpupower to use the RDPRU instruction Natarajan, Janakarajan
2019-10-22 16:39 ` [PATCHv2 0/3] Update cpupower and make it more accurate Natarajan, Janakarajan
2019-10-25 10:47 ` Thomas Renninger
2019-10-25 15:18 ` shuah
2019-11-04 20:21 ` shuah
2019-11-04 21:15 ` Borislav Petkov
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=24194241.SRZ5kbjNg7@skinner.arch.suse.de \
--to=trenn@suse.com \
--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 \
/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).