linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Pavel Machek <pavel@kernel.org>, Len Brown <len.brown@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Saravana Kannan <saravanak@google.com>,
	Maulik Shah <quic_mkshah@quicinc.com>,
	Prasad Sodagudi <psodagud@quicinc.com>,
	Dhruva Gole <d-gole@ti.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] sched: idle: Respect the CPU system-wakeup QoS limit for s2idle
Date: Fri, 17 Oct 2025 12:15:15 +0200	[thread overview]
Message-ID: <20251017101515.GX4067720@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251016151929.75863-4-ulf.hansson@linaro.org>

On Thu, Oct 16, 2025 at 05:19:23PM +0200, Ulf Hansson wrote:

No objections to this.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> index c39b089d4f09..c1c3d0166610 100644
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -131,12 +131,13 @@ void __cpuidle default_idle_call(void)
>  }
>  
>  static int call_cpuidle_s2idle(struct cpuidle_driver *drv,
> -			       struct cpuidle_device *dev)
> +			       struct cpuidle_device *dev,
> +			       u64 max_latency_ns)
>  {
>  	if (current_clr_polling_and_test())
>  		return -EBUSY;
>  
> -	return cpuidle_enter_s2idle(drv, dev);
> +	return cpuidle_enter_s2idle(drv, dev, max_latency_ns);
>  }
>  
>  static int call_cpuidle(struct cpuidle_driver *drv, struct cpuidle_device *dev,
> @@ -205,12 +206,13 @@ static void cpuidle_idle_call(void)
>  		u64 max_latency_ns;
>  
>  		if (idle_should_enter_s2idle()) {
> +			max_latency_ns = cpu_wakeup_latency_qos_limit() *
> +					 NSEC_PER_USEC;
>  
> -			entered_state = call_cpuidle_s2idle(drv, dev);
> +			entered_state = call_cpuidle_s2idle(drv, dev,
> +							    max_latency_ns);
>  			if (entered_state > 0)
>  				goto exit_idle;
> -
> -			max_latency_ns = U64_MAX;
>  		} else {
>  			max_latency_ns = dev->forced_idle_latency_limit_ns;
>  		}
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-10-17 10:15 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 15:19 [PATCH v2 0/4] PM: QoS: Introduce a CPU system-wakeup QoS limit for s2idle Ulf Hansson
2025-10-16 15:19 ` [PATCH v2 1/4] PM: QoS: Introduce a CPU system-wakeup QoS limit Ulf Hansson
2025-10-29  8:10   ` Dhruva Gole
2025-10-29 14:28     ` Rafael J. Wysocki
2025-10-30 16:45       ` Dhruva Gole
2025-10-31 13:47         ` Ulf Hansson
2025-10-31 18:37           ` Dhruva Gole
2025-11-04 13:27             ` Ulf Hansson
2025-10-16 15:19 ` [PATCH v2 2/4] pmdomain: Respect the CPU system-wakeup QoS limit during s2idle Ulf Hansson
2025-10-30 10:44   ` Rafael J. Wysocki
2025-10-30 12:00     ` Ulf Hansson
2025-10-30 12:23       ` Rafael J. Wysocki
2025-10-30 12:32         ` Ulf Hansson
2025-10-30 14:02           ` Rafael J. Wysocki
2025-10-30 15:06             ` Ulf Hansson
2025-10-30 18:11               ` Rafael J. Wysocki
2025-10-31 10:19                 ` Ulf Hansson
2025-11-01  0:11   ` Kevin Hilman
2025-11-04 16:10     ` Ulf Hansson
2025-11-04 16:37       ` Rafael J. Wysocki
2025-11-04 16:52         ` Ulf Hansson
2025-11-04 17:53           ` Rafael J. Wysocki
2025-11-15  0:23       ` Kevin Hilman
2025-10-16 15:19 ` [PATCH v2 3/4] sched: idle: Respect the CPU system-wakeup QoS limit for s2idle Ulf Hansson
2025-10-17 10:15   ` Peter Zijlstra [this message]
2025-10-31 19:23   ` Dhruva Gole
2025-11-04 13:43     ` Ulf Hansson
2025-10-16 15:19 ` [PATCH v2 4/4] Documentation: power/cpuidle: Document the CPU system-wakeup latency QoS Ulf Hansson
2025-10-31 10:57   ` Dhruva Gole
2025-10-31 13:29     ` Ulf Hansson
2025-10-29 14:52 ` [PATCH v2 0/4] PM: QoS: Introduce a CPU system-wakeup QoS limit for s2idle Rafael J. Wysocki
2025-10-30 12:22   ` Ulf Hansson
2025-10-30 12:26     ` Rafael J. Wysocki
2025-10-30 12:29       ` Rafael J. Wysocki
2025-10-30 12:43         ` Ulf Hansson
2025-10-30 14:06           ` Rafael J. Wysocki
2025-10-30 15:12             ` Ulf Hansson
2025-10-30 16:36               ` Rafael J. Wysocki
2025-10-31 10:03                 ` Ulf Hansson

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=20251017101515.GX4067720@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=d-gole@ti.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=khilman@baylibre.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=psodagud@quicinc.com \
    --cc=quic_mkshah@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.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;
as well as URLs for NNTP newsgroup(s).