Re: [PATCH v8 08/11] virt: Introduce steal governor driver
From: Yury Norov
Date: Tue Jul 21 2026 - 13:12:07 EST
On Mon, Jul 20, 2026 at 10:52:47PM +0530, Shrikanth Hegde wrote:
> Introduce a new driver in virt named steal_governor. This driver
> will compute the steal time and drive the policy decisions of preferred
> CPU state.
>
> More on it can be found in the Documentation/driver-api/steal-governor.rst
>
> There is a new kconfig called STEAL_GOVERNOR which is introduced in
> subsequent patches. That driver is going to select PREFERRED_CPU.
> This makes configs driven by user preference.
> When the driver is disabled, preferred CPUs is same as active CPUs.
>
> File layout of the driver is being kept simple.
> - core.c - contains main driver code. This includes the periodic
> work function and take action on steal time which is introduced
> in subsequent patches.
> - core.h - header file which includes data structure.
>
> Main structure of steal governor has,
> - work: deferred periodic work function
> - steal, time: To calculate the delta in periodic work.
> - interval_ms, high_threshold, low_threshold: debug knobs of
> steal_governor.
>
> While there, Add MAINTAINERS entry for this new driver.
>
> Signed-off-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
> ---
> Documentation/driver-api/index.rst | 1 +
> Documentation/driver-api/steal-governor.rst | 117 ++++++++++++++++++++
> MAINTAINERS | 9 ++
> drivers/virt/steal_governor/core.c | 48 ++++++++
> drivers/virt/steal_governor/core.h | 25 +++++
Unless I missed something, you don't use struct steal_governor out of
the driver. If so, you don't need this layout. Just put everything in
drivers/virt/steal_governor.c.
Thanks,
Yury