class PowerDomain

Defined at line 333 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

PowerDomain establishes the relationship between a set of CPUs, the energy

model that describes their characteristics, and the power level controller

responsible for changing the active power levels for the set of CPUs.

Instances of PowerDomain are safe for concurrent use.

Public Methods

void PowerDomain (uint32_t id, zx_cpu_set_t cpus, EnergyModel model, fbl::RefPtr<PowerLevelController> controller)

Defined at line 335 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

uint32_t id ()

ID representing the relationship between a set of CPUs and a power model.

Defined at line 342 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

const zx_cpu_set_t & cpus ()

Set of CPUs associated with `model()`.

Defined at line 345 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

const EnergyModel & model ()

Model describing the behavior of the power domain.

Defined at line 348 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

Utilization total_normalized_utilization ()

The total normalized utilization of the set of processors associated with this power domain.

Uses relaxed semantics, since the value does not need to synchronize with other memory accesses

and innaccuracy is acceptable.

Defined at line 354 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

const fbl::RefPtr<PowerLevelController> & controller ()

Handler for transitions where the target level's control interface is not kernel handled.

Defined at line 359 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

bool scheduler_control_enabled ()

Returns whether the kernel scheduler should send power level update requests to the controller.

This is used by tests to prevent the scheduler from sending power level change requests through

the fake control interface that could confuse the test. It does not prevent the kernel from

exercising the control interface, however, only whether the scheduler will interact with the

control interface to handle utilization changes.

Uses relaxed semantics, since this variable will generally be synchronized by the lock

protecting each PowerState as it is associated with this PowerDomain. However, an atomic is

used to prevent formal data races if the value is read outside of external synchronization,

which can't be statically checked internally.

Defined at line 371 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

void SetSchedulerControlEnabled (bool enabled)

Sets whether the kernel scheduler should send power level update requests through the control

interface. When set to false, the scheduler must not send requests to avoid confusing tests.

Defined at line 377 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

Friends

class PowerState