Skip to content
Snippets Groups Projects
  1. Mar 09, 2010
  2. Nov 24, 2009
    • Gautham R Shenoy's avatar
      powerpc/pseries: Add hooks to put the CPU into an appropriate offline state · 3aa565f5
      Gautham R Shenoy authored
      
      When a CPU is offlined on POWER currently, we call rtas_stop_self() and hand
      the CPU back to the resource pool. This path is used for DLPAR which will
      cause a change in the LPAR configuration which will be visible outside.
      
      This patch changes the default state a CPU is put into when it is offlined.
      On platforms which support ceding the processor to the hypervisor with
      latency hint specifier value, during a cpu offline operation,
      instead of calling rtas_stop_self(), we cede the vCPU to the hypervisor
      while passing a latency hint specifier value. The Hypervisor can use this hint
      to provide better energy savings. Also, during the offline
      operation, the control of the vCPU remains with the LPAR as oppposed to
      returning it to the resource pool.
      
      The patch achieves this by creating an infrastructure to set the
      preferred_offline_state() which can be either
      - CPU_STATE_OFFLINE: which is the current behaviour of calling
        rtas_stop_self()
      
      - CPU_STATE_INACTIVE: which cedes the vCPU to the hypervisor with the latency
        hint specifier.
      
      The codepath which wants to perform a DLPAR operation can set the
      preferred_offline_state() of a CPU to CPU_STATE_OFFLINE before invoking
      cpu_down().
      
      The patch also provides a boot-time command line argument to disable/enable
      CPU_STATE_INACTIVE.
      
      Signed-off-by: default avatarGautham R Shenoy <ego@in.ibm.com>
      Signed-off-by: default avatarNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3aa565f5
Loading