Skip to content

Intel lpmd next#115

Merged
spandruvada merged 21 commits into
mainfrom
intel_lpmd_next
Apr 13, 2026
Merged

Intel lpmd next#115
spandruvada merged 21 commits into
mainfrom
intel_lpmd_next

Conversation

@spandruvada
Copy link
Copy Markdown
Contributor

Miscellaneous fixes.

jengelh and others added 21 commits April 10, 2026 16:05
The manual says: "This macro should be used instead of plain ‘if’ in
code outside of an ‘AC_DEFUN’ macro, when the contents of the ‘if’
use ‘AC_REQUIRE’ directly or indirectly". Since one cannot know
whether something is going to be AC_REQUIRED indirectly, it is safer
to just always use AS_IF.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
The use of `-a` is non-portable, and it has been actively removed
from POSIX.1-2024
<https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html>.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
cgroup isolation mode doesn't work in LPMD because when writing
'isolated' to cpuset.cpus.partition file the expectation is that
cpuset.cpus will be a subset of cpuset.cpus.exclusive of that cgroup.

The simple fix is to write the same content to cpuset.cpus and
cpuset.cpus.exclusive when switching into the isolated mode.

However a problem can appear if there are any other cgroups on the
system that have exclusive cpus claimed. For one LPMD will just shut
down if it can't set affinity into any cpu it wants during core type
discovery phase. Aside from that using this simple version of the fix
will later result in creating an invalid cgroup partition.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
…rites

When WLT proxy is enabled it's supposed to set it's own polling timeout.
The problem is in the state machine an early return happens - that
disables polling timeout - when the non-proxy polling is disabled. Given
that it has nothing to do with the proxy polling it should not interfere
in the proxy setting it's own timeouts.

Change order of the early returns so that it happens after the WLT proxy
check - thereby not overwriting the interval assigned by the proxy code.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
If one profile, let's say the balanced one, is set to enable AUTO LPMD,
and another one like the performance one, has LPMD OFF, then a deadlock
might happen when using the wlt proxy system. Basically when going into
the OFF state, polling gets disabled and there is no specific code flow
to get it enabled again after switching back to an AUTO state.

This only affects the wlt proxy as other polling and non-polling systems
seem to be able to get themselves back up again.

Reinitialize the polling interval when switching power profiles.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
When fail to read PATH_ITMT_CONTROL, return error.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
ITMT became broken when the enabling file was moved to the debugfs. The
data in the file also changed from printing out 0 or 1 to printing out N
or Y characters. However 0 and 1 are still accepted for writing.

Change the file that's being accesses to the debugfs and add helpers for
the Y/N format.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
[Also kept the legacy /procfs control when debugfs doesn't exist]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
itmt_init() only returns 0, no use of using return value.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
The cpu name in the config file is described as having 16 cores while
the specific tags in the config file try to enable higher core indices
than 16.

Correct the indices.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Get the readme source to a readable format for editing.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Make clear how to start the program to avoid confusion around the
default behavior.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Update the main man page with new informations about LPMD. Mention what
are the expectation towards the user, clear up intel_lpmd_control
section since it has it's own man page and add how to enable the system
service persistently in the examples section.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Cleanup the long lines and link in the config man page at the end.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Cleanup some topics that expanded since they were written. Make general
cleanups and small corrections to typos or style.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
[Change MTL to Lunar Lake]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Some options are not currently doing anything. Move them out of the
proper part of the man page to avoid confusing users.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Add configuration for Panther Lake 4P+0E+4L.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
There is no use case of special power group to send message to LPMD.
Allow only root users.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Expose the current daemon state (OFF/ON/AUTO/FREEZE/TERMINATE) via a new
GetState D-Bus method and a STATUS command in intel_lpmd_control, so
clients can query the active mode without having to track it externally.

Signed-off-by: Peter Jung <ptr1337@archlinux.org>
Signed-off-by: Peter Jung <admin@ptr1337.dev>
@spandruvada spandruvada merged commit 876db20 into main Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants