[PATCH v1 0/3] tools: Add intel-lpmd to the kernel tools

Maciej Wieczor-Retman posted 3 patches 1 month ago
MAINTAINERS                                   |   6 +
tools/Makefile                                |  13 +-
tools/power/x86/intel-lpmd/Makefile           | 155 ++++
tools/power/x86/intel-lpmd/README.md          | 182 +++++
.../x86/intel-lpmd/data/intel_lpmd.service.in |  19 +
.../x86/intel-lpmd/data/intel_lpmd_config.xml | 106 +++
.../data/intel_lpmd_config_F6_M170.xml        | 166 ++++
.../data/intel_lpmd_config_F6_M189.xml        | 188 +++++
.../data/intel_lpmd_config_F6_M204.xml        | 213 +++++
.../data/intel_lpmd_config_examples.xml       | 213 +++++
.../data/intel_lpmd_config_experimental.xml   | 252 ++++++
.../data/org.freedesktop.intel_lpmd.conf      |  20 +
.../org.freedesktop.intel_lpmd.service.in     |   5 +
tools/power/x86/intel-lpmd/doc/WLT_proxy.md   |  84 ++
.../intel-lpmd/lpmd-resource.gresource.xml    |   6 +
tools/power/x86/intel-lpmd/man/intel_lpmd.8   |  79 ++
.../intel-lpmd/man/intel_lpmd_config.xml.5    | 329 ++++++++
.../x86/intel-lpmd/man/intel_lpmd_control.8   |  44 ++
tools/power/x86/intel-lpmd/src/include/lpmd.h | 408 ++++++++++
.../x86/intel-lpmd/src/include/thermal.h      |  94 +++
.../src/intel_lpmd_dbus_interface.xml         |  27 +
tools/power/x86/intel-lpmd/src/lpmd_cgroup.c  | 213 +++++
tools/power/x86/intel-lpmd/src/lpmd_config.c  | 493 ++++++++++++
tools/power/x86/intel-lpmd/src/lpmd_cpu.c     | 481 +++++++++++
tools/power/x86/intel-lpmd/src/lpmd_cpumask.c | 479 +++++++++++
.../x86/intel-lpmd/src/lpmd_dbus_server.c     | 274 +++++++
tools/power/x86/intel-lpmd/src/lpmd_helpers.c | 385 +++++++++
tools/power/x86/intel-lpmd/src/lpmd_hfi.c     | 373 +++++++++
tools/power/x86/intel-lpmd/src/lpmd_irq.c     | 262 ++++++
tools/power/x86/intel-lpmd/src/lpmd_main.c    | 297 +++++++
tools/power/x86/intel-lpmd/src/lpmd_misc.c    | 483 +++++++++++
tools/power/x86/intel-lpmd/src/lpmd_proc.c    | 492 ++++++++++++
tools/power/x86/intel-lpmd/src/lpmd_socket.c  | 149 ++++
.../x86/intel-lpmd/src/lpmd_state_machine.c   | 747 ++++++++++++++++++
tools/power/x86/intel-lpmd/src/lpmd_uevent.c  | 133 ++++
tools/power/x86/intel-lpmd/src/lpmd_util.c    | 369 +++++++++
tools/power/x86/intel-lpmd/src/lpmd_wlt.c     | 107 +++
.../src/wlt_proxy/include/state_common.h      | 106 +++
.../src/wlt_proxy/include/wlt_proxy.h         |  10 +
.../x86/intel-lpmd/src/wlt_proxy/spike_mgmt.c | 202 +++++
.../intel-lpmd/src/wlt_proxy/state_machine.c  | 314 ++++++++
.../intel-lpmd/src/wlt_proxy/state_manager.c  | 302 +++++++
.../x86/intel-lpmd/src/wlt_proxy/state_util.c | 584 ++++++++++++++
.../x86/intel-lpmd/src/wlt_proxy/wlt_proxy.c  |  31 +
.../intel-lpmd/tests/lpm_test_interface.sh    |  64 ++
.../x86/intel-lpmd/tools/intel_lpmd_control.c |  97 +++
46 files changed, 10050 insertions(+), 6 deletions(-)
create mode 100644 tools/power/x86/intel-lpmd/Makefile
create mode 100644 tools/power/x86/intel-lpmd/README.md
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd.service.in
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config.xml
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_F6_M170.xml
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_F6_M189.xml
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_F6_M204.xml
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_examples.xml
create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_experimental.xml
create mode 100644 tools/power/x86/intel-lpmd/data/org.freedesktop.intel_lpmd.conf
create mode 100644 tools/power/x86/intel-lpmd/data/org.freedesktop.intel_lpmd.service.in
create mode 100644 tools/power/x86/intel-lpmd/doc/WLT_proxy.md
create mode 100644 tools/power/x86/intel-lpmd/lpmd-resource.gresource.xml
create mode 100644 tools/power/x86/intel-lpmd/man/intel_lpmd.8
create mode 100644 tools/power/x86/intel-lpmd/man/intel_lpmd_config.xml.5
create mode 100644 tools/power/x86/intel-lpmd/man/intel_lpmd_control.8
create mode 100644 tools/power/x86/intel-lpmd/src/include/lpmd.h
create mode 100644 tools/power/x86/intel-lpmd/src/include/thermal.h
create mode 100644 tools/power/x86/intel-lpmd/src/intel_lpmd_dbus_interface.xml
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_cgroup.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_config.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_cpu.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_cpumask.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_dbus_server.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_helpers.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_hfi.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_irq.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_main.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_misc.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_proc.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_socket.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_state_machine.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_uevent.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_util.c
create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_wlt.c
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/include/state_common.h
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/include/wlt_proxy.h
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/spike_mgmt.c
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/state_machine.c
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/state_manager.c
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/state_util.c
create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/wlt_proxy.c
create mode 100755 tools/power/x86/intel-lpmd/tests/lpm_test_interface.sh
create mode 100644 tools/power/x86/intel-lpmd/tools/intel_lpmd_control.c
[PATCH v1 0/3] tools: Add intel-lpmd to the kernel tools
Posted by Maciej Wieczor-Retman 1 month ago
LPMD (Low Power Mode Daemon) [1] is a program that helps increase
mobile platform power efficiency based on current workload and user
configuration. On newer systems hardware hints guide the decision
making while on older ones software calculated system utilization can be
used.

Depending on the workload LPMD manages active CPUs through cgroups,
and if available balances different sysfs knobs and sliders to get the
most power efficient result. Special emphasis is put on L-cores - low
power CPUs management to get the most value out of newer hardware that
supports such distinction.

Moving the development of LPMD to the kernel tree can increase it's
effectiveness through maintaining higher quality standards and better
community cooperation.

Notable differences between this patchset and the github version [1] are
 - reformatting the whole codebase in kernel coding style
 - the autogen system is dropped in favour of a simpler Makefile

Other than that no functional changes should be introduced in
comparison.

[1] https://github.com/intel/intel-lpmd

Fabio M. De Francesco (3):
  tools/LPMD: Add Intel Low Power Mode Daemon
  tools/LPMD: Add Makefile
  tools: Add LPMD entry to tools Makefile

 MAINTAINERS                                   |   6 +
 tools/Makefile                                |  13 +-
 tools/power/x86/intel-lpmd/Makefile           | 155 ++++
 tools/power/x86/intel-lpmd/README.md          | 182 +++++
 .../x86/intel-lpmd/data/intel_lpmd.service.in |  19 +
 .../x86/intel-lpmd/data/intel_lpmd_config.xml | 106 +++
 .../data/intel_lpmd_config_F6_M170.xml        | 166 ++++
 .../data/intel_lpmd_config_F6_M189.xml        | 188 +++++
 .../data/intel_lpmd_config_F6_M204.xml        | 213 +++++
 .../data/intel_lpmd_config_examples.xml       | 213 +++++
 .../data/intel_lpmd_config_experimental.xml   | 252 ++++++
 .../data/org.freedesktop.intel_lpmd.conf      |  20 +
 .../org.freedesktop.intel_lpmd.service.in     |   5 +
 tools/power/x86/intel-lpmd/doc/WLT_proxy.md   |  84 ++
 .../intel-lpmd/lpmd-resource.gresource.xml    |   6 +
 tools/power/x86/intel-lpmd/man/intel_lpmd.8   |  79 ++
 .../intel-lpmd/man/intel_lpmd_config.xml.5    | 329 ++++++++
 .../x86/intel-lpmd/man/intel_lpmd_control.8   |  44 ++
 tools/power/x86/intel-lpmd/src/include/lpmd.h | 408 ++++++++++
 .../x86/intel-lpmd/src/include/thermal.h      |  94 +++
 .../src/intel_lpmd_dbus_interface.xml         |  27 +
 tools/power/x86/intel-lpmd/src/lpmd_cgroup.c  | 213 +++++
 tools/power/x86/intel-lpmd/src/lpmd_config.c  | 493 ++++++++++++
 tools/power/x86/intel-lpmd/src/lpmd_cpu.c     | 481 +++++++++++
 tools/power/x86/intel-lpmd/src/lpmd_cpumask.c | 479 +++++++++++
 .../x86/intel-lpmd/src/lpmd_dbus_server.c     | 274 +++++++
 tools/power/x86/intel-lpmd/src/lpmd_helpers.c | 385 +++++++++
 tools/power/x86/intel-lpmd/src/lpmd_hfi.c     | 373 +++++++++
 tools/power/x86/intel-lpmd/src/lpmd_irq.c     | 262 ++++++
 tools/power/x86/intel-lpmd/src/lpmd_main.c    | 297 +++++++
 tools/power/x86/intel-lpmd/src/lpmd_misc.c    | 483 +++++++++++
 tools/power/x86/intel-lpmd/src/lpmd_proc.c    | 492 ++++++++++++
 tools/power/x86/intel-lpmd/src/lpmd_socket.c  | 149 ++++
 .../x86/intel-lpmd/src/lpmd_state_machine.c   | 747 ++++++++++++++++++
 tools/power/x86/intel-lpmd/src/lpmd_uevent.c  | 133 ++++
 tools/power/x86/intel-lpmd/src/lpmd_util.c    | 369 +++++++++
 tools/power/x86/intel-lpmd/src/lpmd_wlt.c     | 107 +++
 .../src/wlt_proxy/include/state_common.h      | 106 +++
 .../src/wlt_proxy/include/wlt_proxy.h         |  10 +
 .../x86/intel-lpmd/src/wlt_proxy/spike_mgmt.c | 202 +++++
 .../intel-lpmd/src/wlt_proxy/state_machine.c  | 314 ++++++++
 .../intel-lpmd/src/wlt_proxy/state_manager.c  | 302 +++++++
 .../x86/intel-lpmd/src/wlt_proxy/state_util.c | 584 ++++++++++++++
 .../x86/intel-lpmd/src/wlt_proxy/wlt_proxy.c  |  31 +
 .../intel-lpmd/tests/lpm_test_interface.sh    |  64 ++
 .../x86/intel-lpmd/tools/intel_lpmd_control.c |  97 +++
 46 files changed, 10050 insertions(+), 6 deletions(-)
 create mode 100644 tools/power/x86/intel-lpmd/Makefile
 create mode 100644 tools/power/x86/intel-lpmd/README.md
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd.service.in
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config.xml
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_F6_M170.xml
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_F6_M189.xml
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_F6_M204.xml
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_examples.xml
 create mode 100644 tools/power/x86/intel-lpmd/data/intel_lpmd_config_experimental.xml
 create mode 100644 tools/power/x86/intel-lpmd/data/org.freedesktop.intel_lpmd.conf
 create mode 100644 tools/power/x86/intel-lpmd/data/org.freedesktop.intel_lpmd.service.in
 create mode 100644 tools/power/x86/intel-lpmd/doc/WLT_proxy.md
 create mode 100644 tools/power/x86/intel-lpmd/lpmd-resource.gresource.xml
 create mode 100644 tools/power/x86/intel-lpmd/man/intel_lpmd.8
 create mode 100644 tools/power/x86/intel-lpmd/man/intel_lpmd_config.xml.5
 create mode 100644 tools/power/x86/intel-lpmd/man/intel_lpmd_control.8
 create mode 100644 tools/power/x86/intel-lpmd/src/include/lpmd.h
 create mode 100644 tools/power/x86/intel-lpmd/src/include/thermal.h
 create mode 100644 tools/power/x86/intel-lpmd/src/intel_lpmd_dbus_interface.xml
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_cgroup.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_config.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_cpu.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_cpumask.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_dbus_server.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_helpers.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_hfi.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_irq.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_main.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_misc.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_proc.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_socket.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_state_machine.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_uevent.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_util.c
 create mode 100644 tools/power/x86/intel-lpmd/src/lpmd_wlt.c
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/include/state_common.h
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/include/wlt_proxy.h
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/spike_mgmt.c
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/state_machine.c
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/state_manager.c
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/state_util.c
 create mode 100644 tools/power/x86/intel-lpmd/src/wlt_proxy/wlt_proxy.c
 create mode 100755 tools/power/x86/intel-lpmd/tests/lpm_test_interface.sh
 create mode 100644 tools/power/x86/intel-lpmd/tools/intel_lpmd_control.c

-- 
2.53.0