Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: powersave CPU policy
To:
Philip Guenther <guenther@gmail.com>
Cc:
"Lorenz (xha)" <me@xha.li>, OpenBSD tech <tech@openbsd.org>
Date:
Wed, 15 May 2024 11:32:48 +0100

Download raw body.

Thread
On Wed, 15 May 2024 08:19:12 +0100,
Philip Guenther <guenther@gmail.com> wrote:
> 
> acpicpi_idle() has nothing to tell it why the cpu is being idle so it will
> use the same logic for this as it does for when a CPU goes idle because
> your web browser is waiting for a response from a web-server...which is
> just a really simple (aka dumb) decaying average of how long it stayed idle
> when this function was previously called compared to the C-state latencies,
> such that it was idling longer recently then it'll idle deeper now.
> 
> (With dynamic clock interrupts, that may actually result in it going to
> deep C-states only after some activity so it can wake up and see that it
> was idle for a long time.  :-|  Indeed, it really needs to calculate a
> function of energy use and latency choice vs how long to the next clock
> alarm to see which state is best to drop into...and by how much it should
> ask for an early alarm so that it can come out of the C-state in time for
> when the *real* target time is.)
>

Well, I see simpler solution here. CPU has SPCF_HALTED on my case which can
be used to go into long sleep, until such flag is removed.

-- 
wbr, Kirill