Skip to contentSkip to conversation

tools: add intel_residency

PATCH New Paulo Zanoni 1 participant 2 messages Nov 27, 2015 – Jan 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: add intel_residency

After the recent discussions regarding the effects of the vblank disabling policies on PC state residencies, I started running some experiments to reevaluate some non-intuitive conclusions I had reached. In order to help me do this, I decided to write this tool.

The idea is very simple: the tool puts the system on an screen-on idle state, checks which PC state residency is the deepest we can reach, measures its residency, then does some not-so-idle tests and measures the residencies. You can use the tool to compare different Kernel trees and you can also use the tool to compare enabled vs disabled features.

It's obvious that these cases do not represent real-world use cases of our driver, but they are already enough to highlight differences between the many patches I wrote. I was even able to catch a bug in one of my patches by spotting an unexpected regression in the residencies.

I've been using this tool for FBC, but I expect it to also be useful for PSR, DRRS and similar features. I've been measuring the effects of different optimizations I wrote, and I've also been measuring the FBC vs no-FBC cases.

It is also important to highlight that if your system is not properly configured for efficient power savings the tool may not be able to show differences between the results. On my Broadwell machine, for example, if I don't run "powertop --auto-tune" before running the tool, I get PC2 as the deepest state, and 90%+ residency for every workload. After properly configuring the machine, I get PC7 as the deepest state, which is the expected.

So far I only tested this tool on BDW and SKL, and it may hit some unexpected assertions for older platforms.

I only implemented the cases that are immediately useful for me, but we may also expand the tool in the future. We can add more important workloads. We can add support for screen-off cases, so we can compare the effects of runtime PM and other screen-off features. There's a lot we can do, but none of this is on my current priority list.

And remember: /usr/bin/paste is your friend when comparing results.

---
 tools/.gitignore        |   1 +
 tools/Makefile.sources  |   1 +
 tools/intel_residency.c | 700 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 702 insertions(+)
 create mode 100644 tools/intel_residency.c
tools/.gitignore +1 -0
index 1240652..6ca6fbe 100644
@@ -25,6 +25,7 @@ intel_panel_fitter
 intel_perf_counters
 intel_reg
 intel_reg_checker
+intel_residency
 intel_stepping
 intel_watermark
 skl_compute_wrpll
tools/Makefile.sources +1 -0
index b536d45..2862a41 100644
@@ -29,6 +29,7 @@ bin_PROGRAMS = 				\
 	intel_panel_fitter		\
 	intel_perf_counters		\
 	intel_reg_checker 		\
+	intel_residency			\
 	intel_stepping 			\
 	intel_watermark
 
tools/intel_residency.c new file +700 -0

700 lines not on this page · raw message

Signature · 6 lines
2.6.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/1 tools: add intel_residency

After the recent discussions regarding the effects of the vblank disabling policies on PC state residencies, I started running some experiments to reevaluate some non-intuitive conclusions I had reached. In order to help me do this, I decided to write this tool.

The idea is very simple: the tool puts the system on an screen-on idle state, checks which PC state residency is the deepest we can reach, measures its residency, then does some not-so-idle tests and measures the residencies. You can use the tool to compare different Kernel trees and you can also use the tool to compare enabled vs disabled features.

It's obvious that these cases do not represent real-world use cases of our driver, but they are already enough to highlight differences between the many patches I wrote. I was even able to catch a bug in one of my patches by spotting an unexpected regression in the residencies.

I've been using this tool for FBC, but I expect it to also be useful for PSR, DRRS and similar features. I've been measuring the effects of different optimizations I wrote, and I've also been measuring the FBC vs no-FBC cases.

It is also important to highlight that if your system is not properly configured for efficient power savings the tool may not be able to show differences between the results. On my Broadwell machine, for example, if I don't run "powertop --auto-tune" before running the tool, I get PC2 as the deepest state, and 90%+ residency for every workload. After properly configuring the machine, I get PC7 as the deepest state, which is the expected.

So far I only tested this tool on BDW and SKL, and it may hit some unexpected assertions for older platforms.

I only implemented the cases that are immediately useful for me, but we may also expand the tool in the future. We can add more important workloads. We can add support for screen-off cases, so we can compare the effects of runtime PM and other screen-off features. There's a lot we can do, but none of this is on my current priority list.

And remember: /usr/bin/paste is your friend when comparing results.

v2:
- Be more idle at setup_idle().
- Improve printing for /usr/bin/paste usage.

---
 tools/.gitignore        |   1 +
 tools/Makefile.sources  |   1 +
 tools/intel_residency.c | 708 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 710 insertions(+)
 create mode 100644 tools/intel_residency.c

I kept using the tool after the initial submission and improved it a little bit. Now I plan to push it quickly since some people seem to be interested.

tools/.gitignore +1 -0
index 1240652..6ca6fbe 100644
@@ -25,6 +25,7 @@ intel_panel_fitter
 intel_perf_counters
 intel_reg
 intel_reg_checker
+intel_residency
 intel_stepping
 intel_watermark
 skl_compute_wrpll
tools/Makefile.sources +1 -0
index 5c6dc93..5d5958d 100644
@@ -29,6 +29,7 @@ bin_PROGRAMS = 				\
 	intel_panel_fitter		\
 	intel_perf_counters		\
 	intel_reg_checker 		\
+	intel_residency			\
 	intel_stepping 			\
 	intel_watermark
 
tools/intel_residency.c new file +708 -0

708 lines not on this page · raw message

Signature · 6 lines
2.6.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx