1. 03 8月, 2015 1 次提交
    • J
      thermal: power_allocator: trace the real requested power · d5f83109
      Javi Merino 提交于
      The power allocator governor uses ftrace to output a bunch of internal
      data for debugging and tuning.  Currently, the requested power it
      outputs is the "weighted" requested power, that is, what each cooling
      device has requested multiplied by the cooling device weight.  It is
      more useful to trace the real request, without any weight being
      applied.
      
      This commit only affects the data traced, there is no functional change.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      d5f83109
  2. 12 5月, 2015 1 次提交
    • J
      thermal: power_allocator: round the division when divvying up power · ea54cac9
      Javi Merino 提交于
      In situations where there is an uneven number of cooling devices, the
      division of power among them can lead to a milliwatt being dropped on
      the floor due to rounding errors.  This doesn't sound like a lot, but
      some devices only grant the lowest cooling device state for their
      maximum power.  So for instance, if the granted_power is the maximum
      power and all devices are getting their maximum power, one would get
      max_power - 1, making it choose cooling device state 1, instead of 0.
      
      Round the division to make the calculation more accurate.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      ea54cac9
  3. 05 5月, 2015 2 次提交
    • J
      thermal: add trace events to the power allocator governor · 6828a471
      Javi Merino 提交于
      Add trace events for the power allocator governor and the power actor
      interface of the cpu cooling device.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      6828a471
    • J
      thermal: introduce the Power Allocator governor · 6b775e87
      Javi Merino 提交于
      The power allocator governor is a thermal governor that controls system
      and device power allocation to control temperature.  Conceptually, the
      implementation divides the sustainable power of a thermal zone among
      all the heat sources in that zone.
      
      This governor relies on "power actors", entities that represent heat
      sources.  They can report current and maximum power consumption and
      can set a given maximum power consumption, usually via a cooling
      device.
      
      The governor uses a Proportional Integral Derivative (PID) controller
      driven by the temperature of the thermal zone.  The output of the
      controller is a power budget that is then allocated to each power
      actor that can have bearing on the temperature we are trying to
      control.  It decides how much power to give each cooling device based
      on the performance they are requesting.  The PID controller ensures
      that the total power budget does not exceed the control temperature.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      6b775e87