• Rafael J. Wysocki's avatar
    thermal: gov_fair_share: Use .manage() callback instead of .throttle() · bec55332
    Rafael J. Wysocki authored
    The Fair Share governor tries very hard to be stateless and so it
    calls get_trip_level() from fair_share_throttle() every time, even
    though the number produced by this function for all of the trips
    during a given thermal zone update is actually the same.  Since
    get_trip_level() walks all of the trips in the thermal zone every
    time it is called, doing this may generate quite a bit of completely
    useless overhead.
    
    For this reason, make the governor use the new .manage() callback
    instead of .throttle() which allows it to call get_trip_level() just
    once and use the value computed by it to handle all of the trips.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
    bec55332
gov_fair_share.c 3.52 KB