• L
    PM: EM: Add .get_cost() callback · bdc21a4d
    Lukasz Luba 提交于
    The Energy Model (EM) supports devices which report abstract power scale,
    not only real Watts. The primary goal for EM is to enable the Energy Aware
    Scheduler (EAS) for a given platform. Some of the platforms might not be
    able to deliver proper power values. The only information that they might
    have is the relative efficiency between CPU types.
    
    Thus, it makes sense to remove some restrictions in the EM framework and
    introduce a mechanism which would support those platforms. What is crucial
    for EAS to operate is the 'cost' field in the EM. The 'cost' is calculated
    internally in EM framework based on knowledge from 'power' values.
    The 'cost' values must be strictly increasing. The existing API with its
    'power' value size restrictions cannot guarantee that the 'cost' will meet
    this requirement.
    
    Since the platform is missing this detailed information, but has only
    efficiency details, introduce a new custom callback in the EM framework.
    The new callback would allow to provide the 'cost' values which reflect
    efficiency of the CPUs. This would allow to provide EAS information which
    has different relation than what would be forced by the EM internal
    formulas calculating 'cost' values. Thanks to this new callback it is
    possible to create a system view for EAS which has no overlapping
    performance states across many Performance Domains.
    Signed-off-by: NLukasz Luba <lukasz.luba@arm.com>
    Reviewed-by: NIonela Voinescu <ionela.voinescu@arm.com>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    bdc21a4d
energy_model.h 10.5 KB