[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1438744732-1459-1-git-send-email-ray.huang@amd.com>
Date: Wed, 5 Aug 2015 11:18:50 +0800
From: Huang Rui <ray.huang@....com>
To: Borislav Petkov <bp@...e.de>,
Andy Lutomirski <luto@...capital.net>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
"Len Brown" <lenb@...nel.org>,
John Stultz <john.stultz@...aro.org>,
Frédéric Weisbecker <fweisbec@...il.com>
CC: <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
Andreas Herrmann <herrmann.der.user@...glemail.com>,
Borislav Petkov <bp@...en8.de>,
Fengguang Wu <fengguang.wu@...el.com>,
Aaron Lu <aaron.lu@...el.com>, "Tony Li" <tony.li@....com>,
Huang Rui <ray.huang@....com>
Subject: [PATCH v6 0/2] x86, mwaitt: introduce AMD mwaitt support
Hi,
This patch set introduces a new instruction support on AMD Carrizo (Family
15h, Model 60h-6fh). It adds mwaitx delay function with a configurable
timer.
Andy and Boris provide a suggestion which uses mwaitx on delay method.
As Peter's suggestion of last version (v5), the serial of patch set
provides a test result.
http://marc.info/?l=linux-kernel&m=143436586513713&w=2
Some discussions of the background, please see:
http://marc.info/?l=linux-kernel&m=143202042530498&w=2
http://marc.info/?l=linux-kernel&m=143161327003541&w=2
http://marc.info/?l=linux-kernel&m=143222815331016&w=2
Patch set is rebased on tip/master.
Changes from v1 -> v2
- Remove mwaitx idle implementation since some disputes without power
improvement.
- Add a patch which implement another use case on delay.
- Introduce a kernel parameter (delay) to make delay method configurable.
Changes from v2 -> v3
- Add compared data on commit message
- Remove kernel parameter
- Add hint to avoid to access deep state in future
- Update mwaitx delay method as Petter's suggestion
Changes from v3 -> v4
- Put the MONITORX/MWAITX description into comments
Changes from v4 -> v5
- Remove mwaitx function
- Use mwaitx_delay at init_amd
- Use cpu_tts as montioring address scope
Changes from v5 -> v6
- Move definitions into patch 1
- Completed the power consumption testing both with MWAITX and without
MWAITX
- Use mwaitx_delay at bsp_init_amd
In MWAITX delay, the CPU core will be quiesced in a waiting phase,
diminishing its power consumption.
Run a simple test to measure power consumption:
cat /sys/bus/pci/devices/0000\:00\:18.4/hwmon/hwmon0/power1_acc;
sleep 10000s;
cat /sys/bus/pci/devices/0000\:00\:18.4/hwmon/hwmon0/power1_acc;
* TSC-based default delay: 485115 uWatts average power
* MWAITX-based delay: 252738 uWatts average power
Thus, that's about 240 milliWatts less power consumption. The test
method relies on the support of AMD CPU accumulated power algorithm in
fam15_power for which patches are forthcoming.
Thanks,
Rui
Huang Rui (2):
x86, mwaitt: add monitorx and mwaitx instruction
x86, mwaitt: introduce mwaitx delay with a configurable timer
arch/x86/include/asm/cpufeature.h | 1 +
arch/x86/include/asm/delay.h | 1 +
arch/x86/include/asm/mwait.h | 43 +++++++++++++++++++++++++++++++++++
arch/x86/kernel/cpu/amd.c | 4 ++++
arch/x86/lib/delay.c | 48 ++++++++++++++++++++++++++++++++++++++-
5 files changed, 96 insertions(+), 1 deletion(-)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists