mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Loehle <christian.loehle@arm.com>
To: Roman Kagan <rkagan@amazon.de>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-pm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, nh-open-source@amazon.com
Subject: Re: [PATCH] cpuidle: Add the shallow governors
Date: Sat, 10 Oct 2026 14:43:11 +0100	[thread overview]
Message-ID: <b2fc88e1-f27d-4189-bf46-39f212032966@arm.com> (raw)
In-Reply-To: <askbWVeX1pDtYC60@ub9ea591b72db54.ant.amazon.com>

On 10/9/26 17:50, Roman Kagan wrote:
> On Fri, Oct 09, 2026 at 01:45:40PM +0100, Christian Loehle wrote:
>> On 10/9/26 13:12, Roman Kagan wrote:
>>> On Thu, Oct 08, 2026 at 07:29:43PM +0100, Christian Loehle wrote:
>>>> On 10/8/26 19:17, Christian Loehle wrote:
>>>>> On 10/8/26 19:06, Roman Kagan wrote:
>>>>>> The idle states offered by a platform trade wakeup latency for energy
>>>>>> savings, and there are situations where the trade is not worth making:
>>>>>> while a latency-sensitive workload is running, or during a live update
>>>>>> via kexec, where everything from the outgoing kernel stopping the
>>>>>> workload to the incoming kernel resuming it is downtime, and deep idle
>>>>>> states may lengthen it.
>>>>>>
>>>>>> The mechanisms currently available for that are all one-way.
>>>>>> cpuidle.off=1, idle=poll and idle=halt can only be requested in the
>>>>>> kernel command line and cannot be undone, and the PM QoS interfaces
>>>>>> (/dev/cpu_dma_latency and the per-CPU pm_qos_resume_latency_us
>>>>>> attribute) can only be used once user space is up, so they cannot cover
>>>>>> the boot of the incoming kernel.
>>>>>
>>>>> You can also disable all but the shallowest idle state in sysfs:
>>>>> echo 1 > /sys/devices/system/cpu/cpuX/cpuidle/stateX/disable
>>>>>
>>>>
>>>> And I'd probably prefer having that exposed via the cmdline rather than
>>>> two separate governors...
>>>
>>> Doing this cmdline configuration per-cpu per-state is non-realistic.  I
>>> guess you mean a single option that would express a policy, like "for
>>> all cpus in the system, disable all but the shallowest state" or "...
>>> all but the shallowest non-polling".  But policy is exactly what
>>> governors are for.
>>
>> Yes, I had something like
>> cpuidle.max_exit_latency_us=<N>
>> in mind that then sets the disable attribute for the applicable states.
>>
>>>
>>> Why exactly does having two more separate simple, narrow-purpose
>>> governors sound wrong to you?
>>
>> Because it's a lot of duplicate code we have to maintain (and the
>> documentation).
> 
> Fair.  But then PM QoS model appears to fit better.  I'll see to
> reconcile it with the need to be able to set at boot and clear later.
> 

IMO it only seems that way, the need for yet another exposed qos attribute
is why I think I'd prefer the "initialize states as disabled" approach,
but let me consider your v2.

      reply	other threads:[~2026-10-10 13:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 18:06 Roman Kagan
2026-10-08 18:17 ` Christian Loehle
2026-10-08 18:29   ` Christian Loehle
2026-10-09 12:12     ` Roman Kagan
2026-10-09 12:45       ` Christian Loehle
2026-10-09 16:50         ` Roman Kagan
2026-10-10 13:43           ` Christian Loehle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2fc88e1-f27d-4189-bf46-39f212032966@arm.com \
    --to=christian.loehle@arm.com \
    --cc=corbet@lwn.net \
    --cc=daniel.lezcano@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nh-open-source@amazon.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rkagan@amazon.de \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®