Re: [RFC][PATCH] cpuidle: avoid singing capacitors

From: Pierre Ossman
Date: Sat Mar 01 2008 - 08:41:15 EST


On Fri, 29 Feb 2008 19:38:12 +0100
Pierre Ossman <drzeus-list@xxxxxxxxx> wrote:

> @@ -50,9 +58,16 @@ static int menu_select(struct cpuidle_device *dev)
> break;
> if (s->exit_latency > pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY))
> break;
> + if ((dev->states[i].flags & CPUIDLE_FLAG_DEEP) &&
> + time_before_eq(jiffies, data->last_deep_jif + MIN_DEEP_INTERVAL))
> + break;
> }
>

I guess another approach would be to refuse to enter deep sleep if the sleep time is less than 2 ms. That would mean we would not lose the long sleeps, but if it is just doing short sleeps then we would never enter C3...

Is there a decent way of testing which approach is actually doing the least damage?

Rgds

--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
PulseAudio, core developer http://pulseaudio.org
rdesktop, core developer http://www.rdesktop.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/