linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuidle: use first valid target residency as poll time
@ 2019-12-06 15:07 Marcelo Tosatti
  2019-12-09  9:39 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2019-12-06 15:07 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-kernel, linux-pm


commit 259231a045616c4101d023a8f4dcc8379af265a6 changed, by mistake,
the target residency from the first available sleep state to the last
available sleep state (which should be longer).

This might cause excessive polling.

Fixes: 259231a045616c4101d023a8f4dcc8379af265a6

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 0005be5ea2b4..15877b431143 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -382,6 +382,7 @@ u64 cpuidle_poll_time(struct cpuidle_driver *drv,
 			continue;
 
 		limit_ns = (u64)drv->states[i].target_residency_ns;
+		break;
 	}
 
 	dev->poll_limit_ns = limit_ns;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cpuidle: use first valid target residency as poll time
  2019-12-06 15:07 [PATCH] cpuidle: use first valid target residency as poll time Marcelo Tosatti
@ 2019-12-09  9:39 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2019-12-09  9:39 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Rafael J. Wysocki, Linux Kernel Mailing List, Linux PM

On Fri, Dec 6, 2019 at 5:17 PM Marcelo Tosatti <mtosatti@redhat.com> wrote:
>
>
> commit 259231a045616c4101d023a8f4dcc8379af265a6 changed, by mistake,
> the target residency from the first available sleep state to the last
> available sleep state (which should be longer).
>
> This might cause excessive polling.
>
> Fixes: 259231a045616c4101d023a8f4dcc8379af265a6
>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Applied as 5.5 material (and tagged for 5.4+-stable), thanks!

> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 0005be5ea2b4..15877b431143 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -382,6 +382,7 @@ u64 cpuidle_poll_time(struct cpuidle_driver *drv,
>                         continue;
>
>                 limit_ns = (u64)drv->states[i].target_residency_ns;
> +               break;
>         }
>
>         dev->poll_limit_ns = limit_ns;
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 15:07 [PATCH] cpuidle: use first valid target residency as poll time Marcelo Tosatti
2019-12-09  9:39 ` Rafael J. Wysocki

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).