From: Huang Rui <ray.huang@amd.com>
To: Borislav Petkov <bp@suse.de>,
Thomas Gleixner <tglx@linutronix.de>,
"Peter Zijlstra" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
"Andy Lutomirski" <luto@amacapital.net>,
Robert Richter <rric@kernel.org>,
"Jacob Shin" <jacob.w.shin@gmail.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Kan Liang <kan.liang@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <spg_linux_kernel@amd.com>,
<x86@kernel.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
Borislav Petkov <bp@alien8.de>,
Guenter Roeck <linux@roeck-us.net>,
Fengguang Wu <fengguang.wu@intel.com>,
Huang Rui <ray.huang@amd.com>
Subject: [PATCH v7 0/2] perf/x86/power: Introduce AMD accumlated power reporting mechanism
Date: Mon, 7 Mar 2016 10:26:40 +0800 [thread overview]
Message-ID: <1457317602-2903-1-git-send-email-ray.huang@amd.com> (raw)
Hi,
This series of patches introduces the perf implementation of
accumulated power reporting algorithm. It will calculate the average
power consumption for the processor. The CPU feature flag is
CPUID.8000_0007H:EDX[12].
The V7 is rebased on bp/tip-perf. And need two dependent patches at
tip because of modular perf driver:
http://git.kernel.org/tip/675965b00d734c985e4285f5bec7e524d15fc4e1
http://git.kernel.org/tip/3712bba1a260ad851f3aa8ddea9cb7326f6aa0b3
Changes from v1 -> v2:
- Add a patch to fix the build issue which is reported by kbuild test
robot.
Changes from v2 -> v3:
- Use raw_spinlock_t instead of spinlock_t, because it need meet the
-rt mode use case.
- Use topology_sibling_cpumask to make the cpumask operation easier.
Changes from v3 -> v4:
- Remove active_list, because it is not iterated.
- Capitalize sentences consistently and fix some typos.
- Fix some code style issues.
- Initialize structures in a vertically aligned manner.
- Remove unnecessary comment.
- Fix the runtime bug, and do some testing on CPU-hotplug scenario.
Changes from v4 -> v5:
- Remove "struct pmu" and lock from power_pmu, and rename it to
power_pmu_masks
- As Peter's suggestion, add a new struct to hw_perf_event, and track
these values from per-event.
Changes from v5 -> v6:
- Remove MAX_CUS check
- Remove DEFINE_PER_CPU(struct power_pmu_masks *, amd_power_pmu)
- Remove power_cpu_prepare power_cpu_free and refine power_cpu_init
and power_cpu_exit
- Use smp_num_siblings instead of cores_per_cu variable.
- Make this driver as a module.
- Add a patch to export events_sysfs_show.
Changes from v6 -> v7:
- Remove unnecessary cu_num.
- Remove unnecessary initialization for target as nr_cpumask_bits.
- Refine power_cpu_init interface.
- Handle CPU_DOWN_FAILED case.
- Remove unnecessary tmp variable.
- Re-write the initialization of for_each_online_cpu(cpu) loop.
- Move __register_cpu_notifier after perf_pmu_register.
Thanks,
Rui
Huang Rui (2):
perf/x86: Export events_sysfs_show()
perf/x86/amd/power: Add AMD accumulated power reporting mechanism
arch/x86/Kconfig | 9 +
arch/x86/kernel/cpu/Makefile | 1 +
arch/x86/kernel/cpu/perf_event.c | 1 +
arch/x86/kernel/cpu/perf_event_amd_power.c | 353 +++++++++++++++++++++++++++++
include/linux/perf_event.h | 4 +
5 files changed, 368 insertions(+)
create mode 100644 arch/x86/kernel/cpu/perf_event_amd_power.c
--
1.9.1
next reply other threads:[~2016-03-07 2:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 2:26 Huang Rui [this message]
2016-03-07 2:26 ` [PATCH v7 1/2] perf/x86: Export events_sysfs_show() Huang Rui
2016-03-07 2:26 ` [PATCH v7 2/2] perf/x86/amd/power: Add AMD accumulated power reporting mechanism Huang Rui
2016-03-07 15:44 ` Thomas Gleixner
2016-03-08 11:04 ` 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=1457317602-2903-1-git-send-email-ray.huang@amd.com \
--to=ray.huang@amd.com \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=acme@kernel.org \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=fengguang.wu@intel.com \
--cc=jacob.w.shin@gmail.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rric@kernel.org \
--cc=spg_linux_kernel@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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