Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: powersave CPU policy
To:
Renato Aguiar <renato@renatoaguiar.net>
Cc:
tech@openbsd.org
Date:
Tue, 18 Jun 2024 12:31:13 +0100

Download raw body.

Thread
On Tue, 18 Jun 2024 06:11:03 +0100,
Renato Aguiar <renato@renatoaguiar.net> wrote:
> 
> 
> I think a patch to just disable specific cpu cores from userspace,
> e.g. via sysctl, is more likely to be accepted. If there were such
> mechanism, you could implement your power saving policy in userspace,
> like obsdfreqd does.
> 

I continue to work on this patch, with Theo suggesting to start from scratch
and abandon the idea of disabling a specific CPU core.

Why not? Because it makes logic quite complicated, and my first attempt had
missed the case when process is pinned to some CPU core.

Probably it can be handled well, but it increases complexity of logic and
makes it quite frigiel.

Regarding your suggestion: what should kernel do with case when user pin
some process to CPUX core and then disable it?

From my point of view, the right answer is to avoid disabling CPU core.

And the only way than I did it is to remove CPU from scheduler and force it
into deeper c-state.

But a naive implementation of policy with idea similar to Linux ondemand
proved that I really don't need it.

-- 
wbr, Kirill