Commit Graph

102 Commits

Author SHA1 Message Date
Augusto Caringi c9415305b6 Merge: Update intel_idle to upstream v6.15
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6660

JIRA: https://issues.redhat.com/browse/RHEL-85522
JIRA: https://issues.redhat.com/browse/RHEL-45063

Signed-off-by: David Arcari <darcari@redhat.com>

Approved-by: Tony Camuso <tcamuso@redhat.com>
Approved-by: Lenny Szubowicz <lszubowi@redhat.com>
Approved-by: Steve Best <sbest@redhat.com>
Approved-by: Mark Langsdorf <mlangsdo@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Augusto Caringi <acaringi@redhat.com>
2025-04-04 12:34:51 -03:00
David Arcari 5cc9581465 intel_idle: introduce 'no_native' module parameter
JIRA: https://issues.redhat.com/browse/RHEL-85522

commit 5e7e39ae15b0ea370e783a9326fdd1d91357fc3e
Author: David Arcari <darcari@redhat.com>
Date:   Thu Feb 20 10:11:20 2025 -0500

    intel_idle: introduce 'no_native' module parameter

    Since commit 18734958e9 ("intel_idle: Use ACPI _CST for processor models
    without C-state tables") the intel_idle driver has had the ability to use
    the ACPI _CST to populate C-states when the processor model is not
    recognized.

    However, even when the processor model is recognized (native mode) there
    are cases where it is useful to make the driver ignore the per-CPU idle
    states in lieu of ACPI C-states (such as specific application performance).

    Add a new 'no_native' module parameter to provide this functionality.

    Signed-off-by: David Arcari <darcari@redhat.com>
    Link: https://patch.msgid.link/20250220151120.1131122-1-darcari@redhat.com
    Reviewed-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
    [ rjw: Spell CPU in capitals ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-03-31 17:38:11 -04:00
David Arcari 8b4033c281 cpufreq: intel_pstate: Make it possible to avoid enabling CAS
JIRA: https://issues.redhat.com/browse/RHEL-85517

commit 7802fce7dc18394d041a1310fe4ad76120e08145
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Mon Jan 27 14:07:12 2025 +0100

    cpufreq: intel_pstate: Make it possible to avoid enabling CAS

    Capacity-aware scheduling (CAS) is enabled by default by intel_pstate on
    hybrid systems without SMT, but in some usage scenarios it may be more
    attractive to place tasks for maximum CPU performance regardless of the
    extra cost in terms of energy, which is the case on such systems when
    CAS is not enabled, so introduce a command line option to forbid
    intel_pstate to enable CAS.

    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by:Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/2781262.mvXUDI8C0e@rjwysocki.net

Signed-off-by: David Arcari <darcari@redhat.com>
2025-03-31 08:07:03 -04:00
David Arcari 897d688b36 cpufreq/amd-pstate: Store the boost numerator as highest perf again
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 50a062a7620051c09adacd6d140ebd56881a333b
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Mon Dec 9 12:52:34 2024 -0600

    cpufreq/amd-pstate: Store the boost numerator as highest perf again

    commit ad4caad58d91d ("cpufreq: amd-pstate: Merge
    amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()")
    changed the semantics for highest perf and commit 18d9b52271213
    ("cpufreq/amd-pstate: Use nominal perf for limits when boost is disabled")
    worked around those semantic changes.

    This however is a confusing result and furthermore makes it awkward to
    change frequency limits and boost due to the scaling differences. Restore
    the boost numerator to highest perf again.

    Suggested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Fixes: ad4caad58d91 ("cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()")
    Link: https://lore.kernel.org/r/20241209185248.16301-2-mario.limonciello@amd.com
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:43 -05:00
David Arcari bf86a53040 amd-pstate: Add missing documentation for `amd_pstate_prefcore_ranking`
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 15a2b764ea7c16dd2b1ecfd86ba27809f5bd8580
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Tue Sep 3 14:43:10 2024 -0500

    amd-pstate: Add missing documentation for `amd_pstate_prefcore_ranking`

    `amd_pstate_prefcore_ranking` reflects the dynamic rankings of a CPU
    core based on platform conditions.  Explicitly include it in the
    documentation.

    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:21 -05:00
David Arcari 7cd967ff36 cpufreq: amd-pstate: Add documentation for `amd_pstate_hw_prefcore`
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit b96b82d1af7fbf35e3c7d50368275005bd6b6a03
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Mon Aug 26 16:13:58 2024 -0500

    cpufreq: amd-pstate: Add documentation for `amd_pstate_hw_prefcore`

    Explain that the sysfs file represents both preferred core being
    enabled by the user and supported by the hardware.

    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:18 -05:00
David Arcari 883c247fa7 Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 6d588891a90c5a946aaac11a93d06edd89ed9054
Author: Perry Yuan <perry.yuan@amd.com>
Date:   Tue Jun 25 23:27:33 2024 -0500

    Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method

    Updates the documentation in `amd-pstate.rst` to include information about
    the per CPU boost control feature. Users can now enable or disable the
    Core Performance Boost (CPB) feature on individual CPUs using the `boost`
    sysfs attribute.

    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Signed-off-by: Perry Yuan <perry.yuan@amd.com>
    Co-developed-by: Mario Limonciello <mario.limonciello@amd.com>
    Link: https://lore.kernel.org/r/20240626042733.3747-5-mario.limonciello@amd.com
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:16 -05:00
David Arcari dd833533d3 Documentation: PM: amd-pstate: add guided mode to the Operation mode
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 1d53f30b3aa6120ca91789254cb2dfff9ff8c533
Author: Perry Yuan <perry.yuan@amd.com>
Date:   Wed Jun 19 23:40:16 2024 +0800

    Documentation: PM: amd-pstate: add guided mode to the Operation mode

    the guided mode is also supported, so the operation mode should include
    that mode as well.

    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Perry Yuan <perry.yuan@amd.com>
    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Link: https://lore.kernel.org/r/a61d825ef71f6aacc8f1624fe9fb982b8446b5a7.1718811234.git.perry.yuan@amd.com
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:13 -05:00
David Arcari d3b797656f Documentation: PM: amd-pstate: Fix section title underline
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 4c7dbd85218d6e2ed0495bbaf40c1b1c6bac506b
Author: Meng Li <li.meng@amd.com>
Date:   Mon Feb 5 14:03:05 2024 +0800

    Documentation: PM: amd-pstate: Fix section title underline

    Title under line too short

    Signed-off-by: Meng Li <li.meng@amd.com>
    [ rjw: Subject edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:09 -05:00
David Arcari 42755f4b6c Documentation: amd-pstate: introduce amd-pstate preferred core
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 3a004e1fee4ba3d37976c1a9707869acc8d60b55
Author: Meng Li <li.meng@amd.com>
Date:   Fri Jan 19 17:05:01 2024 +0800

    Documentation: amd-pstate: introduce amd-pstate preferred core

    Introduce amd-pstate preferred core.

    check preferred core state set by the kernel parameter:
    $ cat /sys/devices/system/cpu/amd-pstate/prefcore

    Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
    Reviewed-by: Wyes Karny <wyes.karny@amd.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Reviewed-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Perry Yuan <perry.yuan@amd.com>
    Signed-off-by: Meng Li <li.meng@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:06 -05:00
David Arcari 470da2d23f Documentation: admin-guide: PM: Fix two typos
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 03c305861c70d6db898dd2379b882e7772a5c5d0
Author: Erwan Velu <erwanaliasr1@gmail.com>
Date:   Tue Jan 9 18:57:53 2024 +0100

    Documentation: admin-guide: PM: Fix two typos

    Fix two typos in the admin-guide:

     - a missing e in "reference_perf" in cppc_sysfs.rst.
     - the amd_pstate sysfs path uses a dash instead of an underscore.

    Signed-off-by: Erwan Velu <e.velu@criteo.com>
    [ rjw: Subject and changelog edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:03 -05:00
David Arcari 94e064a186 Documentation: cpufreq: amd-pstate: Update amd_pstate status sysfs for guided
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 7a9dec665f6875f61fe0c2e71b25842daade5110
Author: Wyes Karny <wyes.karny@amd.com>
Date:   Tue Mar 7 11:27:40 2023 +0000

    Documentation: cpufreq: amd-pstate: Update amd_pstate status sysfs for guided

    Update amd_pstate status sysfs for guided mode.

    Acked-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
    Signed-off-by: Wyes Karny <wyes.karny@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:34:01 -05:00
David Arcari cacf4963e5 Documentation: amd-pstate: disambiguate user space sections
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 73dd3206811af32695e46ca71e2b0da5dac81ad9
Author: Bagas Sanjaya <bagasdotme@gmail.com>
Date:   Wed Feb 15 19:32:53 2023 +0700

    Documentation: amd-pstate: disambiguate user space sections

    kernel test robot reported htmldocs warning:

    Documentation/admin-guide/pm/amd-pstate.rst:343: WARNING: duplicate label admin-guide/pm/amd-pstate:user space interface in ``sysfs``, other instance in Documentation/admin-guide/pm/amd-pstate.rst

    The documentation contains two sections with the same "User Space Interface
    in ``sysfs``" title. The first one deals with per-policy sysfs and the
    second one is about general attributes (currently only global attributes
    are documented).

    Disambiguate title text of both sections to fix the warning.

    Link: https://lore.kernel.org/linux-doc/202302151041.0SWs1RHK-lkp@intel.com/
    Fixes: b9e6a2d47b2565 ("Documentation: amd-pstate: introduce new global sysfs attributes")
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
    Reviewed-by: Wyes Karny <wyes.karny@amd.com>
    Acked-by: Huang Rui <ray.huang@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:33:58 -05:00
David Arcari e34c207454 Documentation: amd-pstate: introduce new global sysfs attributes
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit b9e6a2d47b2565eb450d3ee900fba49cc9b25cbd
Author: Perry Yuan <perry.yuan@amd.com>
Date:   Tue Jan 31 17:00:16 2023 +0800

    Documentation: amd-pstate: introduce new global sysfs attributes

    The amd-pstate driver supports switching working modes at runtime.
    Users can view and change modes by interacting with the "status" sysfs
    attribute.

    1) check driver mode:
    $ cat /sys/devices/system/cpu/amd-pstate/status

    2) switch mode:
    `# echo "passive" | sudo tee /sys/devices/system/cpu/amd-pstate/status`
    or
    `# echo "active" | sudo tee /sys/devices/system/cpu/amd-pstate/status`

    Acked-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Reviewed-by: Wyes Karny <wyes.karny@amd.com>
    Tested-by: Wyes Karny <wyes.karny@amd.com>
    Signed-off-by: Perry Yuan <perry.yuan@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:33:56 -05:00
David Arcari be1768be16 Documentation: amd-pstate: add amd pstate driver mode introduction
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 92e6088427c5da7ef8dc92d6ab2f0f8f6a01fab7
Author: Perry Yuan <Perry.Yuan@amd.com>
Date:   Tue Jan 31 17:00:13 2023 +0800

    Documentation: amd-pstate: add amd pstate driver mode introduction

    The amd-pstate driver has two operation modes supported:
    * CPPC Autonomous (active) mode
    * CPPC non-autonomous (passive) mode.
    active mode and passive mode can be chosen by different kernel parameters.

    Acked-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Reviewed-by: Wyes Karny <wyes.karny@amd.com>
    Tested-by: Wyes Karny <wyes.karny@amd.com>
    Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:33:54 -05:00
David Arcari 417cf56641 Documentation: amd-pstate: add EPP profiles introduction
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit e22abc6bb97cee240200d037a16b73951df16f9a
Author: Perry Yuan <Perry.Yuan@amd.com>
Date:   Tue Jan 31 17:00:07 2023 +0800

    Documentation: amd-pstate: add EPP profiles introduction

    The amd-pstate driver supports a feature called energy performance
    preference (EPP). Add information to the documentation to explain
    how users can interact with the sysfs files for this feature.

    1) See all EPP profiles
    $ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
    default performance balance_performance balance_power power

    2) Check current EPP profile
    $ sudo cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference
    performance

    3) Set new EPP profile
    $ sudo bash -c "echo power > /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference"

    Acked-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Reviewed-by: Wyes Karny <wyes.karny@amd.com>
    Tested-by: Wyes Karny <wyes.karny@amd.com>
    Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:33:52 -05:00
David Arcari 289510049e Documentation: amd-pstate: Add tbench and gitsource test introduction
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit 67c0b2b5291656cbcb15371f835f5152fae2f7a2
Author: Meng Li <li.meng@amd.com>
Date:   Mon Oct 31 16:49:24 2022 +0800

    Documentation: amd-pstate: Add tbench and gitsource test introduction

    Introduce tbench and gitsource test cases design and implementation.
    Monitor cpus changes about performance and power consumption etc.

    Signed-off-by: Meng Li <li.meng@amd.com>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:33:32 -05:00
David Arcari b7255bf1e5 cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()
JIRA: https://issues.redhat.com/browse/RHEL-75923

commit ad4caad58d91d3293880f8074f7ad125490ce636
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Mon Aug 26 16:13:56 2024 -0500

    cpufreq: amd-pstate: Merge amd_pstate_highest_perf_set() into amd_get_boost_ratio_numerator()

    The special case in amd_pstate_highest_perf_set() is the value used
    for calculating the boost numerator.  Merge this into
    amd_get_boost_ratio_numerator() and then use that to calculate boost
    ratio.

    This allows dropping more special casing of the highest perf value.

    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2025-02-18 07:27:27 -05:00
Scott Weaver b3aca00150 Merge: cgroup/cpuset: Sync up cpuset partition functionality to v6.7
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3340

JIRA: https://issues.redhat.com/browse/RHEL-15939
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3340

An earlier version of the cpuset remote partition patchset was merged
into RHEL9.3 to be used in OCP 4.14 which will change the cgroup default
to v2. The final version of the cpuset remote partition patchset that
was merged upstream differs slightly from the RHEL version. This MR
reverts the current RHEL-only cpset patches and applies the upstream
version that was merged into the v6.7 upstream kernel.

Signed-off-by: Waiman Long <longman@redhat.com>

Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: John B. Wyatt IV <jwyatt@redhat.com>

Signed-off-by: Scott Weaver <scweaver@redhat.com>
2023-12-21 09:54:15 -05:00
Waiman Long d21f03dbc8 Documentation: admin-guide: correct spelling
JIRA: https://issues.redhat.com/browse/RHEL-15939
Conflicts:
 1) A merge conflict in Documentation/admin-guide/dynamic-debug-howto.rst
    due to missing upstream commit 09ee10ff804e ("dyndbg: refine
    verbosity 1-4 summary-detail") and related ones.
 2) Context diff in Documentation/admin-guide/kernel-parameters.txt due
    to missing upstream commit 389cfd96703e ("docs/admin: alphabetize
    parts of kernel-parameters.txt (part 2)").
 3) Context diff in Documentation/admin-guide/pm/amd-pstate.rst due to
    missing upstream commit 67c0b2b52916 ("Documentation: amd-pstate:
    Add tbench and gitsource test introduction").

commit dbeb56fe80e5574388ed9767788e8eb493589443
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Sun, 29 Jan 2023 15:10:45 -0800

    Documentation: admin-guide: correct spelling

    Correct spelling problems for Documentation/admin-guide/ as reported
    by codespell.

    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Zefan Li <lizefan.x@bytedance.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: cgroups@vger.kernel.org
    Cc: Alasdair Kergon <agk@redhat.com>
    Cc: Mike Snitzer <snitzer@kernel.org>
    Cc: dm-devel@redhat.com
    Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
    Cc: linux-media@vger.kernel.org
    Cc: linux-mm@kvack.org
    Link: https://lore.kernel.org/r/20230129231053.20863-2-rdunlap@infradead.org
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Signed-off-by: Waiman Long <longman@redhat.com>
2023-11-08 08:28:11 -05:00
Waiman Long 9b51272213 intel_idle: Add ibrs_off module parameter to force-disable IBRS
JIRA: https://issues.redhat.com/browse/RHEL-8620
Upstream Status: tip commit aa1567a7e6440b8c3af4b0d8a8219d8fc5028c5f

commit aa1567a7e6440b8c3af4b0d8a8219d8fc5028c5f
Author: Waiman Long <longman@redhat.com>
Date:   Thu, 27 Jul 2023 14:46:00 -0400

    intel_idle: Add ibrs_off module parameter to force-disable IBRS

    Commit bf5835bcdb96 ("intel_idle: Disable IBRS during long idle")
    disables IBRS when the cstate is 6 or lower. However, there are
    some use cases where a customer may want to use max_cstate=1 to
    lower latency. Such use cases will suffer from the performance
    degradation caused by the enabling of IBRS in the sibling idle thread.
    Add a "ibrs_off" module parameter to force disable IBRS and the
    CPUIDLE_FLAG_IRQ_ENABLE flag if set.

    In the case of a Skylake server with max_cstate=1, this new ibrs_off
    option will likely increase the IRQ response latency as IRQ will now
    be disabled.

    When running SPECjbb2015 with cstates set to C1 on a Skylake system.

    First test when the kernel is booted with: "intel_idle.ibrs_off":

      max-jOPS = 117828, critical-jOPS = 66047

    Then retest when the kernel is booted without the "intel_idle.ibrs_off"
    added:

      max-jOPS = 116408, critical-jOPS = 58958

    That means booting with "intel_idle.ibrs_off" improves performance by:

      max-jOPS:      +1.2%, which could be considered noise range.
      critical-jOPS: +12%,  which is definitely a solid improvement.

    The admin-guide/pm/intel_idle.rst file is updated to add a description
    about the new "ibrs_off" module parameter.

    Signed-off-by: Waiman Long <longman@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Link: https://lore.kernel.org/r/20230727184600.26768-5-longman@redhat.com

Signed-off-by: Waiman Long <longman@redhat.com>
2023-10-07 15:12:05 -04:00
David Arcari 8ead408e63 platform/x86/intel-uncore-freq: Support for cluster level controls
Bugzilla: https://bugzilla.redhat.com/2177013

commit 9b8dea80e3cb22e1fed4f974841116e10a3dbb35
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Tue Apr 18 10:13:39 2023 -0700

    platform/x86/intel-uncore-freq: Support for cluster level controls

    An SoC can contain multiple power domains with individual or collection
    of mesh partitions. This partition is called fabric cluster.

    Certain type of meshes will need to run at the same frequency, they will
    be placed in the same fabric cluster. Benefit of fabric cluster is that
    it offers a scalable mechanism to deal with partitioned fabrics in a SoC.

    The current sysfs interface supports control at package and die level.
    This interface is not enough to support more granular control at
    fabric cluster level.

    SoCs with the support of TPMI (Topology Aware Register and PM Capsule
    Interface), can have multiple power domains. Each power domain can
    contain one or more fabric clusters.

    To support such granular controls, enhance uncore common to optionally
    create new directories to provide controls at fabric cluster level. It
    is also important to have flexibility to change granularity for future
    version of SoCs. If the directory name contains scope like:
    "package_*_die_*_power_domain_*_cluster_*", then this is not expandable.

    The cpufreq policies also have different scopes. There the scope of the
    policy (affected_cpus) specified by attributes inside each policy.
    So, follow the same model for uncore frequency scaling sysfs as:
    "sys/devices/system/cpu/cpufreq/policy*"

    Allow client drivers to optionally support granular control for each
    fabric cluster. Here, the directory name will be "uncore" suffixed with
    an unique instance number. For example: uncore00, uncore01 etc.
    Attributes in the directory identify package id, power domain and
    fabric cluster id. This interface is expandable even if some new level
    of granularity is introduced. A new sysfs attribute can identify new
    level.

    For compatibility with the existing sysfs and provide easy way to set
    limits for each fabric cluster in the package/die, the existing control
    at package/die levels are still provided. For majority of users, this is
    an easy approach.

    For example: On a single package/die system, with three power domains
    and one fabric cluster per power domain:

    $tree -L 2 /sys/devices/system/cpu/intel_uncore_frequency/
    /sys/devices/system/cpu/intel_uncore_frequency/
    ├── package_00_die_00
    │   ├── current_freq_khz
    │   ├── initial_max_freq_khz
    │   ├── initial_min_freq_khz
    │   ├── max_freq_khz
    │   └── min_freq_khz
    ├── uncore00
    │   ├── current_freq_khz
    │   ├── domain_id
    │   ├── fabric_cluster_id
    │   ├── initial_max_freq_khz
    │   ├── initial_min_freq_khz
    │   ├── max_freq_khz
    │   ├── min_freq_khz
    │   └── package_id
    ├── uncore01
    │   ├── current_freq_khz
    │   ├── domain_id
    │   ├── fabric_cluster_id
    │   ├── initial_max_freq_khz
    │   ├── initial_min_freq_khz
    │   ├── max_freq_khz
    │   ├── min_freq_khz
    │   └── package_id
    └── uncore02
        ├── current_freq_khz
        ├── domain_id
        ├── fabric_cluster_id
        ├── initial_max_freq_khz
        ├── initial_min_freq_khz
        ├── max_freq_khz
        ├── min_freq_khz
        └── package_id

    The attribute for cluster id is "fabric_cluster_id" instead of just
    "cluster_id" is to avoid confusion with usage of term clusters in
    other part of the Linux kernel.

    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Reviewed-by: Zhang Rui <rui.zhang@intel.com>
    Tested-by: Wendy Wang <wendy.wang@intel.com>
    Link: https://lore.kernel.org/r/20230418171340.681662-3-srinivas.pandruvada@linux.intel.com
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2023-09-13 11:25:53 -04:00
David Arcari 0c2c92b37b Documentation: admin-guide: pm: Document uncore frequency scaling
Bugzilla: https://bugzilla.redhat.com/2177013

commit a644161ba11df38e5582e718c99668e282ddbf36
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Mon Feb 28 11:57:59 2022 -0800

    Documentation: admin-guide: pm: Document uncore frequency scaling

    Added documentation to configure uncore frequency limits in Intel
    Xeon processors.

    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    [ rjw: Clean up the document wording ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2023-09-13 11:25:53 -04:00
Herton R. Krzesinski 4679ab20bd Merge: x86: remove vendor checks from prefer_mwait_c1_over_halt
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1730

Bugzilla: https://bugzilla.redhat.com/2150068
Tested: https://bugzilla.redhat.com/show_bug.cgi?id=2150068#c1

This changes the behavior of the default_idle from HLT to MWAIT
on later model AMD systems that support MWAIT.  However, if
'idle=nomwait' is added to the kernel command line, HLT is used
as intended.

Signed-off-by: David Arcari <darcari@redhat.com>

Approved-by: Dean Nelson <dnelson@redhat.com>
Approved-by: Steve Best <sbest@redhat.com>
Approved-by: Prarit Bhargava <prarit@redhat.com>

Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2023-01-13 14:28:09 +00:00
David Arcari 3b9297ce05 Documentation: amd-pstate: add driver working mode introduction
Bugzilla: https://bugzilla.redhat.com/2150425

commit 8a2cbf72a43ade1ed00760f65914e322599fe662
Author: Perry Yuan <Perry.Yuan@amd.com>
Date:   Thu Nov 17 15:35:40 2022 +0800

    Documentation: amd-pstate: add driver working mode introduction

    Introduce the `amd_pstate` driver new working mode with
    `amd_pstate=passive` added to kernel command line.
    If there is no passive mode enabled by user, amd_pstate driver will be
    disabled by default for now.

    Acked-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
    Tested-by: Wyes Karny <wyes.karny@amd.com>
    Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2022-12-06 09:08:07 -05:00
David Arcari 8112d54eaa Documentation: amd-pstate: Add unit test introduction
Bugzilla: https://bugzilla.redhat.com/2150425

commit 7fe3629729ce5466f865b75c506d7cb6223838ba
Author: Meng Li <li.meng@amd.com>
Date:   Wed Aug 17 11:46:30 2022 +0800

    Documentation: amd-pstate: Add unit test introduction

    Introduce the AMD P-State unit test module design and implementation.
    It also talks about kselftest and how to use.

    Signed-off-by: Meng Li <li.meng@amd.com>
    Acked-by: Huang Rui <ray.huang@amd.com>
    Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

Signed-off-by: David Arcari <darcari@redhat.com>
2022-12-06 09:03:56 -05:00
David Arcari 1f2303c8f1 Documentation: amd-pstate: grammar and sentence structure updates
Bugzilla: https://bugzilla.redhat.com/2150425

commit 7000ef38052b219583f17a10ef2e7ca99b5e585e
Author: Jan Engelhardt <jengelh@inai.de>
Date:   Wed Mar 23 11:26:02 2022 +0100

    Documentation: amd-pstate: grammar and sentence structure updates

    Signed-off-by: Jan Engelhardt <jengelh@inai.de>
    Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2022-12-06 09:02:56 -05:00
David Arcari 2387d86bd5 Documentation: amd-pstate: add tracer tool introduction
Bugzilla: https://bugzilla.redhat.com/2150425

commit b020771a66e474cd8450b3c483cec8492702db22
Author: Jinzhou Su <Jinzhou.Su@amd.com>
Date:   Wed Mar 9 09:23:51 2022 +0800

    Documentation: amd-pstate: add tracer tool introduction

    Add amd pstate tracer tool introduction

    Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
    Reviewed-by: Huang Rui <ray.huang@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2022-12-06 09:02:56 -05:00
David Arcari ea8bebcc9a Documentation: amd-pstate: Add AMD P-State driver introduction
Bugzilla: https://bugzilla.redhat.com/2150425

commit c22760885fd6f7161fabde8e7db63d7f085b125a
Author: Huang Rui <ray.huang@amd.com>
Date:   Fri Dec 24 09:05:07 2021 +0800

    Documentation: amd-pstate: Add AMD P-State driver introduction

    Introduce the AMD P-State driver design and implementation.

    Signed-off-by: Huang Rui <ray.huang@amd.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: David Arcari <darcari@redhat.com>
2022-12-06 09:02:18 -05:00
David Arcari 214f9d3cfd x86: Handle idle=nomwait cmdline properly for x86_idle
Bugzilla: https://bugzilla.redhat.com/2150068

commit 8bcedb4ce04750e1ccc9a6b6433387f6a9166a56
Author: Wyes Karny <wyes.karny@amd.com>
Date:   Mon Jun 6 23:33:34 2022 +0530

    x86: Handle idle=nomwait cmdline properly for x86_idle

    When kernel is booted with idle=nomwait do not use MWAIT as the
    default idle state.

    If the user boots the kernel with idle=nomwait, it is a clear
    direction to not use mwait as the default idle state.
    However, the current code does not take this into consideration
    while selecting the default idle state on x86.

    Fix it by checking for the idle=nomwait boot option in
    prefer_mwait_c1_over_halt().

    Also update the documentation around idle=nomwait appropriately.

    [ dhansen: tweak commit message ]

    Signed-off-by: Wyes Karny <wyes.karny@amd.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Tested-by: Zhang Rui <rui.zhang@intel.com>
    Link: https://lkml.kernel.org/r/fdc2dc2d0a1bc21c2f53d989ea2d2ee3ccbc0dbe.1654538381.git-series.wyes.karny@amd.com

Signed-off-by: David Arcari <darcari@redhat.com>
2022-12-02 13:01:58 -05:00
Linus Torvalds 3563f55ce6 Power management updates for 5.14-rc1
- Make intel_pstate support hybrid processors using abstract
    performance units in the HWP interface (Rafael Wysocki).
 
  - Add Icelake servers and Cometlake support in no-HWP mode to
    intel_pstate (Giovanni Gherdovich).
 
  - Make cpufreq_online() error path be consistent with the CPU
    device removal path in cpufreq (Rafael Wysocki).
 
  - Clean up 3 cpufreq drivers and the statistics code (Hailong Liu,
    Randy Dunlap, Shaokun Zhang).
 
  - Make intel_idle use special idle state parameters for C6 when
    package C-states are disabled (Chen Yu).
 
  - Rework the TEO (timer events oriented) cpuidle governor to address
    some theoretical shortcomings in it (Rafael Wysocki).
 
  - Drop unneeded semicolon from the TEO governor (Wan Jiabing).
 
  - Modify the runtime PM framework to accept unassigned suspend
    and resume callback pointers (Ulf Hansson).
 
  - Improve pm_runtime_get_sync() documentation (Krzysztof Kozlowski).
 
  - Improve device performance states support in the generic power
    domains (genpd) framework (Ulf Hansson).
 
  - Fix some documentation issues in genpd (Yang Yingliang).
 
  - Make the operating performance points (OPP) framework use the
    required-opps DT property in use cases that are not related to
    genpd (Hsin-Yi Wang).
 
  - Make lazy_link_required_opp_table() use list_del_init instead of
    list_del/INIT_LIST_HEAD (Yang Yingliang).
 
  - Simplify wake IRQs handling in the core system-wide sleep support
    code and clean up some coding style inconsistencies in it (Tian
    Tao, Zhen Lei).
 
  - Add cooling support to the tegra30 devfreq driver and improve its
    DT bindings (Dmitry Osipenko).
 
  - Fix some assorted issues in the devfreq core and drivers (Chanwoo
    Choi, Dong Aisheng, YueHaibing).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmDbaFwSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxR/gP/inFFjdwWpq3r6XD5P4XeVvum/MEjqQs
 rDUDHXgEEZmWGL9CpQ0PxhXyvc7SSqtNLakECTXxrOccfMbo0NKQtjCt8eMO1XMu
 nrAcp68hr/Rg2TaenRC3j0+oGXPzOw5/Mg5Y9subRymdI3o5HyoJNjBkU+LlkdGs
 HC7k8zWPqKQaEoFgjOpYPuXKf2bvEm2jIh4dzmtCRWXBUOxDgN0z6Kckhs59xrU+
 +CLP/W4XMDrWSYdd2zjPV2IBNsqfePFchZ+t2CMQwYycI+KJr2s8tLbAFnQXfxLz
 WRqxpZKvMUPthKsK2/vgnCQkQKhGq39NmlHdqRdJm8uivCPx1Q2uuHRYF9782M+o
 cWuO60VvtUax0RIk1prP2l6JBBU/3Hvln7uf4cBnIeh/3QZKKygIgnNI1YwaqXSq
 zP4EWY00kKNmKwRUZAkDR9ZavXHiHvtoytT44XU/NxS+YXh6nMLC34CeuDUQaqni
 JvniXQyZCIWecZhwbOpW+FmAXMBCyvqXarDM0Zw4coWoyFLN7Y8ow9C5T5EWcgQ+
 pKyGhS698HiePPJrwDOtOqzfPqxcgXEWUqwmxTeD8MRDSMlamzPnRJh+wxlrIdv9
 2c8SAOSD7xvRlQQcsOpEVcKVkjsWDy7tvK6/O2CtoBsUpZOXtKIKJhr7ixnLN3Ej
 XHX/voFVDIao
 =mgLK
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management updates from Rafael Wysocki:
 "These add hybrid processors support to the intel_pstate driver and
  make it work with more processor models when HWP is disabled, make the
  intel_idle driver use special C6 idle state paremeters when package
  C-states are disabled, add cooling support to the tegra30 devfreq
  driver, rework the TEO (timer events oriented) cpuidle governor,
  extend the OPP (operating performance points) framework to use the
  required-opps DT property in more cases, fix some issues and clean up
  a number of assorted pieces of code.

  Specifics:

   - Make intel_pstate support hybrid processors using abstract
     performance units in the HWP interface (Rafael Wysocki).

   - Add Icelake servers and Cometlake support in no-HWP mode to
     intel_pstate (Giovanni Gherdovich).

   - Make cpufreq_online() error path be consistent with the CPU device
     removal path in cpufreq (Rafael Wysocki).

   - Clean up 3 cpufreq drivers and the statistics code (Hailong Liu,
     Randy Dunlap, Shaokun Zhang).

   - Make intel_idle use special idle state parameters for C6 when
     package C-states are disabled (Chen Yu).

   - Rework the TEO (timer events oriented) cpuidle governor to address
     some theoretical shortcomings in it (Rafael Wysocki).

   - Drop unneeded semicolon from the TEO governor (Wan Jiabing).

   - Modify the runtime PM framework to accept unassigned suspend and
     resume callback pointers (Ulf Hansson).

   - Improve pm_runtime_get_sync() documentation (Krzysztof Kozlowski).

   - Improve device performance states support in the generic power
     domains (genpd) framework (Ulf Hansson).

   - Fix some documentation issues in genpd (Yang Yingliang).

   - Make the operating performance points (OPP) framework use the
     required-opps DT property in use cases that are not related to
     genpd (Hsin-Yi Wang).

   - Make lazy_link_required_opp_table() use list_del_init instead of
     list_del/INIT_LIST_HEAD (Yang Yingliang).

   - Simplify wake IRQs handling in the core system-wide sleep support
     code and clean up some coding style inconsistencies in it (Tian
     Tao, Zhen Lei).

   - Add cooling support to the tegra30 devfreq driver and improve its
     DT bindings (Dmitry Osipenko).

   - Fix some assorted issues in the devfreq core and drivers (Chanwoo
     Choi, Dong Aisheng, YueHaibing)"

* tag 'pm-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (39 commits)
  PM / devfreq: passive: Fix get_target_freq when not using required-opp
  cpufreq: Make cpufreq_online() call driver->offline() on errors
  opp: Allow required-opps to be used for non genpd use cases
  cpuidle: teo: remove unneeded semicolon in teo_select()
  dt-bindings: devfreq: tegra30-actmon: Add cooling-cells
  dt-bindings: devfreq: tegra30-actmon: Convert to schema
  PM / devfreq: userspace: Use DEVICE_ATTR_RW macro
  PM: runtime: Clarify documentation when callbacks are unassigned
  PM: runtime: Allow unassigned ->runtime_suspend|resume callbacks
  PM: runtime: Improve path in rpm_idle() when no callback
  PM: hibernate: remove leading spaces before tabs
  PM: sleep: remove trailing spaces and tabs
  PM: domains: Drop/restore performance state votes for devices at runtime PM
  PM: domains: Return early if perf state is already set for the device
  PM: domains: Split code in dev_pm_genpd_set_performance_state()
  cpuidle: teo: Use kerneldoc documentation in admin-guide
  cpuidle: teo: Rework most recent idle duration values treatment
  cpuidle: teo: Change the main idle state selection logic
  cpuidle: teo: Cosmetic modification of teo_select()
  cpuidle: teo: Cosmetic modifications of teo_update()
  ...
2021-06-29 13:36:06 -07:00
Rafael J. Wysocki ed562d280c Merge branches 'pm-cpufreq' and 'pm-cpuidle'
* pm-cpufreq:
  cpufreq: Make cpufreq_online() call driver->offline() on errors
  cpufreq: loongson2: Remove unused linux/sched.h headers
  cpufreq: sh: Remove unused linux/sched.h headers
  cpufreq: stats: Clean up local variable in cpufreq_stats_create_table()
  cpufreq: intel_pstate: hybrid: Fix build with CONFIG_ACPI unset
  cpufreq: sc520_freq: add 'fallthrough' to one case
  cpufreq: intel_pstate: Add Cometlake support in no-HWP mode
  cpufreq: intel_pstate: Add Icelake servers support in no-HWP mode
  cpufreq: intel_pstate: hybrid: CPU-specific scaling factor
  cpufreq: intel_pstate: hybrid: Avoid exposing two global attributes

* pm-cpuidle:
  cpuidle: teo: remove unneeded semicolon in teo_select()
  cpuidle: teo: Use kerneldoc documentation in admin-guide
  cpuidle: teo: Rework most recent idle duration values treatment
  cpuidle: teo: Change the main idle state selection logic
  cpuidle: teo: Cosmetic modification of teo_select()
  cpuidle: teo: Cosmetic modifications of teo_update()
  intel_idle: Adjust the SKX C6 parameters if PC6 is disabled
2021-06-29 15:53:07 +02:00
Mauro Carvalho Chehab 17420f3138 docs: admin-guide: pm: avoid using ReST :doc:`foo` markup
The :doc:`foo` tag is auto-generated via automarkup.py.
So, use the filename at the sources, instead of :doc:`foo`.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/04616d9fc0b4a0d33486fa0018631a2db2eba860.1623824363.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-06-17 13:24:36 -06:00
Rafael J. Wysocki 154ae8bb3c cpuidle: teo: Use kerneldoc documentation in admin-guide
There are two descriptions of the TEO (Timer Events Oriented) cpuidle
governor in the kernel source tree, one in the C file containing its
code and one in cpuidle.rst which is part of admin-guide.

Instead of trying to keep them both in sync and in order to reduce
text duplication, include the governor description from the C file
directly into cpuidle.rst.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-06-11 18:36:45 +02:00
Rafael J. Wysocki c3d175e485 cpufreq: intel_pstate: hybrid: Avoid exposing two global attributes
The turbo_pct and num_pstates sysfs attributes represent CPU
properties that may be different for differenty types of CPUs in
a hybrid processor, so avoid exposing them in that case.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-05-21 18:44:55 +02:00
Andrew Klychkov 751d5b2741 Documentation: fix multiple typos found in the admin-guide subdirectory
Fix thirty five typos in dm-integrity.rst, dm-raid.rst, dm-zoned.rst,
verity.rst, writecache.rst, tsx_async_abort.rst, md.rst, bttv.rst,
dvb_references.rst, frontend-cardlist.rst, gspca-cardlist.rst, ipu3.rst,
remote-controller.rst, mm/index.rst, numaperf.rst, userfaultfd.rst,
module-signing.rst, imx-ddr.rst, intel-speed-select.rst,
intel_pstate.rst, ramoops.rst, abi.rst, kernel.rst, vm.rst

Signed-off-by: Andrew Klychkov <andrew.a.klychkov@gmail.com>
Link: https://lore.kernel.org/r/20201204072848.GA49895@spblnx124.lan
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-12-08 10:27:56 -07:00
Julia Lawall 23d18dcfc5 Documentation: PM: cpuidle: correct path name
cpu/ is needed before cpu<N>/

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-11-02 18:02:20 +01:00
Julia Lawall 6841ca15fe Documentation: PM: cpuidle: correct typo
cerainly -> certainly

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-11-02 18:00:08 +01:00
Mauro Carvalho Chehab abc59fd4a5 docs: remove some replace macros like |struct foo|
There are three files with replace macros for structs,
mapping them into Sphinx 2.x C domain references.

Well, this is broken on Sphinx 3.x. Also, for Sphinx 2.x,
the automarkup macro should be able to take care of them.

So, let's just drop those.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-15 07:49:40 +02:00
Rafael J. Wysocki 0b9688ee95 Merge back cpuidle material for 5.10.
* pm-cpuidle:
  cpuidle: record state entry rejection statistics
  cpuidle: psci: Allow PM domain to be initialized even if no OSI mode
  firmware: psci: Extend psci_set_osi_mode() to allow reset to PC mode
  ACPI: processor: Print more information when acpi_processor_evaluate_cst() fails
  cpuidle: tegra: Correctly handle result of arm_cpuidle_simple_enter()
2020-10-05 13:11:17 +02:00
Yoann Congal eac53b3e30 Documentation: PM: Fix a reStructuredText syntax error
Fix a reStructuredText syntax error in the cpuidle PM admin-guide
documentation: the ``...'' quotation marks are parsed as partial ''...''
reStructuredText markup and break the output formatting.

This change them to "...".

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-09-30 17:40:37 +02:00
Lina Iyer f49735f497 cpuidle: record state entry rejection statistics
CPUs may fail to enter the chosen idle state if there was a
pending interrupt, causing the cpuidle driver to return an error
value.

Record that and export it via sysfs along with the other idle state
statistics.

This could prove useful in understanding behavior of the governor
and the system during usecases that involve multiple CPUs.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
[ rjw: Changelog and documentation edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-09-23 14:10:31 +02:00
Rafael J. Wysocki b388eb58ce cpufreq: intel_pstate: Tweak the EPP sysfs interface
Modify the EPP sysfs interface to reject attempts to change the EPP
to values different from 0 ("performance") in the active mode with
the "performance" policy (ie. scaling_governor set to "performance"),
to avoid situations in which the kernel appears to discard data
passed to it via the EPP sysfs attribute.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2020-09-01 21:14:06 +02:00
Randy Dunlap 1c50282199 Documentation: fix pm/intel_pstate build warning and wording
Fix documentation build warning and sentence wording:

Documentation/admin-guide/pm/intel_pstate.rst:568: WARNING: Unexpected indentation.

Fixes: f473bf398b ("cpufreq: intel_pstate: Allow raw energy performance preference value")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-08-24 12:48:37 +02:00
Rafael J. Wysocki f3db6de55e Merge branch 'pm-cpufreq'
* pm-cpufreq:
  cpufreq: intel_pstate: Implement passive mode with HWP enabled
2020-08-14 19:39:35 +02:00
Rafael J. Wysocki f6ebbcf08f cpufreq: intel_pstate: Implement passive mode with HWP enabled
Allow intel_pstate to work in the passive mode with HWP enabled and
make it set the HWP minimum performance limit (HWP floor) to the
P-state value given by the target frequency supplied by the cpufreq
governor, so as to prevent the HWP algorithm and the CPU scheduler
from working against each other, at least when the schedutil governor
is in use, and update the intel_pstate documentation accordingly.

Among other things, this allows utilization clamps to be taken
into account, at least to a certain extent, when intel_pstate is
in use and makes it more likely that sufficient capacity for
deadline tasks will be provided.

After this change, the resulting behavior of an HWP system with
intel_pstate in the passive mode should be close to the behavior
of the analogous non-HWP system with intel_pstate in the passive
mode, except that the HWP algorithm is generally allowed to make the
CPU run at a frequency above the floor P-state set by intel_pstate in
the entire available range of P-states, while without HWP a CPU can
run in a P-state above the requested one if the latter falls into the
range of turbo P-states (referred to as the turbo range) or if the
P-states of all CPUs in one package are coordinated with each other
at the hardware level.

[Note that in principle the HWP floor may not be taken into account
 by the processor if it falls into the turbo range, in which case the
 processor has a license to choose any P-state, either below or above
 the HWP floor, just like a non-HWP processor in the case when the
 target P-state falls into the turbo range.]

With this change applied, intel_pstate in the passive mode assumes
complete control over the HWP request MSR and concurrent changes of
that MSR (eg. via the direct MSR access interface) are overridden by
it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2020-08-11 17:29:45 +02:00
Linus Torvalds 2324d50d05 It's been a busy cycle for documentation - hopefully the busiest for a
while to come.  Changes include:
 
  - Some new Chinese translations
 
  - Progress on the battle against double words words and non-HTTPS URLs
 
  - Some block-mq documentation
 
  - More RST conversions from Mauro.  At this point, that task is
    essentially complete, so we shouldn't see this kind of churn again for a
    while.  Unless we decide to switch to asciidoc or something...:)
 
  - Lots of typo fixes, warning fixes, and more.
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEIw+MvkEiF49krdp9F0NaE2wMflgFAl8oVkwPHGNvcmJldEBs
 d24ubmV0AAoJEBdDWhNsDH5YoW8H/jJ/xnXFn7tkgVPQAlL3k5HCnK7A5nDP9RVR
 cg1pTx1cEFdjzxPlJyExU6/v+AImOvtweHXC+JDK7YcJ6XFUNYXJI3LxL5KwUXbY
 BL/xRFszDSXH2C7SJF5GECcFYp01e/FWSLN3yWAh+g+XwsKiTJ8q9+CoIDkHfPGO
 7oQsHKFu6s36Af0LfSgxk4sVB7EJbo8e4psuPsP5SUrl+oXRO43Put0rXkR4yJoH
 9oOaB51Do5fZp8I4JVAqGXvpXoExyLMO4yw0mASm6YSZ3KyjR8Fae+HD9Cq4ZuwY
 0uzb9K+9NEhqbfwtyBsi99S64/6Zo/MonwKwevZuhtsDTK4l4iU=
 =JQLZ
 -----END PGP SIGNATURE-----

Merge tag 'docs-5.9' of git://git.lwn.net/linux

Pull documentation updates from Jonathan Corbet:
 "It's been a busy cycle for documentation - hopefully the busiest for a
  while to come. Changes include:

   - Some new Chinese translations

   - Progress on the battle against double words words and non-HTTPS
     URLs

   - Some block-mq documentation

   - More RST conversions from Mauro. At this point, that task is
     essentially complete, so we shouldn't see this kind of churn again
     for a while. Unless we decide to switch to asciidoc or
     something...:)

   - Lots of typo fixes, warning fixes, and more"

* tag 'docs-5.9' of git://git.lwn.net/linux: (195 commits)
  scripts/kernel-doc: optionally treat warnings as errors
  docs: ia64: correct typo
  mailmap: add entry for <alobakin@marvell.com>
  doc/zh_CN: add cpu-load Chinese version
  Documentation/admin-guide: tainted-kernels: fix spelling mistake
  MAINTAINERS: adjust kprobes.rst entry to new location
  devices.txt: document rfkill allocation
  PCI: correct flag name
  docs: filesystems: vfs: correct flag name
  docs: filesystems: vfs: correct sync_mode flag names
  docs: path-lookup: markup fixes for emphasis
  docs: path-lookup: more markup fixes
  docs: path-lookup: fix HTML entity mojibake
  CREDITS: Replace HTTP links with HTTPS ones
  docs: process: Add an example for creating a fixes tag
  doc/zh_CN: add Chinese translation prefer section
  doc/zh_CN: add clearing-warn-once Chinese version
  doc/zh_CN: add admin-guide index
  doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label
  futex: MAINTAINERS: Re-add selftests directory
  ...
2020-08-04 22:47:54 -07:00
Randy Dunlap b45225b41a Documentation/admin-guide: intel-speed-select: drop doubled words
Drop the doubled words "that" and "and".

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org
Link: https://lore.kernel.org/r/20200704032020.21923-11-rdunlap@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-07-05 14:01:49 -06:00
Randy Dunlap 4d7e204f7d Documentation/admin-guide: intel_pstate: drop doubled word
Drop the doubled word "to".

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-pm@vger.kernel.org
Link: https://lore.kernel.org/r/20200704032020.21923-10-rdunlap@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-07-05 14:01:49 -06:00
Quentin Perret 8412b4563e cpufreq: Specify default governor on command line
Currently, the only way to specify the default CPUfreq governor is
via Kconfig options, which suits users who can build the kernel
themselves perfectly.

However, for those who use a distro-like kernel (such as Android,
with the Generic Kernel Image project), the only way to use a
non-default governor is to boot to userspace, and to then switch
using the sysfs interface. Being able to specify the default governor
on the command line, like is the case for cpuidle, would allow those
users to specify their governor of choice earlier on, and to simplify
the userspace boot procedure slighlty.

To support this use-case, add a kernel command line parameter
allowing the default governor for CPUfreq to be specified, which
takes precedence over the built-in default.

This implementation has one notable limitation: the default governor
must be registered before the driver. This is solved for builtin
governors and drivers using appropriate *_initcall() functions. And
in the modular case, this must be reflected as a constraint on the
module loading order.

Signed-off-by: Quentin Perret <qperret@google.com>
[ Viresh: Converted 'default_governor' to a string and parsing it only
	  at initcall level, and several updates to
	  cpufreq_init_policy(). ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-07-02 13:03:30 +02:00