Skip to contentSkip to conversation

cpuidle: use first valid target residency as poll time

PATCH Applied Marcelo Tosatti 2 participants 2 messages Dec 6, 2019 – Dec 9, 2019 CPU idle time management framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpuidle: use first valid target residency as poll time

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
drivers/cpuidle/cpuidle.c +1 -0
index 0005be5ea2b4..15877b431143 100644
@@ -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;
maintainer Applied
#1 lore raw
Quoted 11 lines · Marcelo Tosatti

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

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

Quoted 13 lines
drivers/cpuidle/cpuidle.c +1 -0
index 0005be5ea2b4..15877b431143 100644
@@ -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;