[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0/5] xen/tools: sched: Credit1: improve handling of vCPU migration delay


vCPU migration delay is a parameter of the Credit1 scheduler specifying for how
long, after a vCPU stopped running on a particular pCPU, the cache(s) should be
considered "hot" for the vCPU's working set.  Basically, if less than the value
set for such parameter (in microseconds) passed, the vCPU is not considered a
candidate for migration on another pCPU.

Right now, the parameter is set at boot, or through the PMOPS sysctl (!!!)
used, e.g., by xenpm. The value, once set, is effective for *all* the instances
of the Credit1 scheduler, in any cpupool that exists already, or that will ever
be created. But the really bad thing is that building Xen without Credit1
support (CONFIG_SCHED_CREDIT=n, it can happen, e.g., when doing randconfig),
currently, fails.

Instead of "just" fixing the build breakage (e.g., with #ifdef-s), this series
does the following:
- makes the migration delay a per-scheduler (== per-cpupool) parameter,
- makes it possible to get/set the parameter via the SCHEDOP sysctl, where it
  belongs (it's a _scheduling_ parameter, not a power management one).

Note that, with the series applied, `xenpm {get,set}-vcpu-migration-delay'
commands continue to work, for backward compatibility. In fact, they are
re-implemented via SCHEDOP, and a deprecation warning message is added.

The series is available as a branch here:


or here:


Travis is red, but that seems to me to be related to ARM infra issues, rather
than to problem with the series itself:


Dario Faggioli (5):
      xen: sched/credit: convert scheduling parameter to s_time_t when set
      xen: sched/credit1: make vcpu_migration_delay per-cpupool
      tools: libxl/xl: allow to get/set Credit1's vcpu_migration_delay
      tools: xenpm: continue to support {set,get}-vcpu-migration-delay
      xen/libxc: suppress direct access to Credit1's migration delay

 docs/man/xl.pod.1.in          |   11 ++++
 tools/libxc/include/xenctrl.h |    2 -
 tools/libxc/xc_pm.c           |   30 ------------
 tools/libxl/libxl.h           |    7 +++
 tools/libxl/libxl_sched.c     |   10 ++++
 tools/libxl/libxl_types.idl   |    1 
 tools/misc/xenpm.c            |   22 +++++++--
 tools/xl/xl_cmdtable.c        |    1 
 tools/xl/xl_sched.c           |   22 ++++++---
 xen/common/sched_credit.c     |  102 +++++++++++++++++++++--------------------
 xen/drivers/acpi/pmstat.c     |   12 -----
 xen/include/public/sysctl.h   |    5 +-
 xen/include/xen/sched.h       |    3 -
 13 files changed, 119 insertions(+), 109 deletions(-)
<<This happens because I choose it to happen!>> (Raistlin Majere)
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.