x86, mwaitt: introduce AMD mwaitt support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest2 patches 3 repliesIn review
- v52 patches 8 repliesSuperseded
- v42 patches 1 replySuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 2 patches | 8 replies | Superseded | |
| v2 | 4 patches | 24 replies | Superseded | |
| v1 RFC | 4 patches | 36 replies | Applied |
Changes in v6 from the cover letter
- Move definitions into patch 1
- Completed the power consumption testing both with MWAITX and without MWAITX
- Use mwaitx_delay at bsp_init_amd
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | x86, mwaitt: add monitorx and mwaitx instructionarch/ arch/ | +44 | 0 replies | |
| 2/2 | x86, mwaitt: introduce mwaitx delay with a configurable timerarch/ arch/ arch/ | +52 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [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(-)
Signature · 1 line
1.9.1