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

[Xen-devel] [PATCH v2 00/16] Implement vcpu soft affinity for credit1



Hi,

This is take 2 of the per-vcpu NUMA affinity seies... Which is not about
per-vcpu NUMA affinity any more! :-)

As agreed with Jan and George, I re-architected the thing and made it more
general. So, now it's about allowing each vcpu to have:
 - an hard affinity, which they already do, and we usually call pinning. This
   is the list of pcpus where a vcpu is allowed to run;
 - a soft affinity, which this series introduces. This is the list of pcpus
   where a vcpu *prefers* to run.

Once that is done, per-vcpu NUMA-aware scheduling is easily implemented on top
of that, just by instructing libxl to issue the proper call to setup the soft
affinity of the domain's vcpus to be equal to its node-affinity.  (see, for
instance, patch 16).

I'm sorry it took way longer than I expected it to take, but it turned out that
just renaming variables and moving hunks around the series is an activity very
very prone to stupid mistakes! :-P Also, I had to update, and then double check
to have done it correcly, all the changes to the in-tree docs and manpages, to
make sure they actually reflect the new architecture.

As it was before, the first part of the series (patches 1-4) carries the
updated syntax for specifying cpu (both hard and soft) affinity, which has been
discussed and (mostly) acked already, either in v1 or in a previous submission
(under a different series name).

The whole series should be pretty straightforward, as it's mostly renaming
variables and moving or rewiring existing stuff. Perhaps (and I'm staring at
you tool's maintainers :-D) have a thorougher look at patche 11 and 12
(especially 12), where the interface for this new feature is crafted, at the
libxc (patch 11) and libxl (patch 12) level.

Release wise, I think this is a nice feature to have, especially now that we've
made it more general, and it can find users and use cases outside of the NUMa
domain, where it was confined before. Also, I don't think it's that much of a
complex series (as I said, it's mosly renaming/reshuffling), so perhaps it can
go in.  At the same time, the natural consumer for this feature is vNUMA. Thus,
since vNUMA is probably going to be a 4.5 thing, having this series slipping
wouldn't be too bad.

The series is also available here:

 git://xenbits.xen.org/people/dariof/xen.git numa/per-vcpu-affinity-v2

Thanks and Regards,
Dario

---

Dario Faggioli (16):
      xl: match output of vcpu-list with pinning syntax
      xl: allow for node-wise specification of vcpu pinning
  *   xl: implement and enable dryrun mode for `xl vcpu-pin'
  *   xl: test script for the cpumap parser (for vCPU pinning)
      xen: fix leaking of v->cpu_affinity_saved
      xen: sched: make space for cpu_soft_affinity
      xen: sched: rename v->cpu_affinity into v->cpu_hard_affinity
      xen: derive NUMA node affinity from hard and soft CPU affinity
      xen: sched: DOMCTL_*vcpuaffinity works with hard and soft affinity
      xen: sched: use soft-affinity instead of domain's node-affinity
      libxc: get and set soft and hard affinity
      libxl: get and set soft affinity
      xl: show soft affinity in `xl vcpu-list'
      xl: enable setting soft affinity
      xl: enable for specifying node-affinity in the config file
      libxl: automatic NUMA placement affects soft affinity


 docs/man/xl.cfg.pod.5                           |   66 +++
 docs/man/xl.pod.1                               |   34 ++
 docs/misc/xl-numa-placement.markdown            |  164 ++++++---
 tools/libxc/xc_domain.c                         |  153 +++++++-
 tools/libxc/xenctrl.h                           |   53 +++
 tools/libxl/Makefile                            |    1 
 tools/libxl/check-xl-vcpupin-parse              |  294 +++++++++++++++
 tools/libxl/check-xl-vcpupin-parse.data-example |   53 +++
 tools/libxl/libxl.c                             |  206 ++++++++++-
 tools/libxl/libxl.h                             |   23 +
 tools/libxl/libxl_create.c                      |    6 
 tools/libxl/libxl_dom.c                         |   22 +
 tools/libxl/libxl_types.idl                     |    4 
 tools/libxl/libxl_utils.h                       |   13 +
 tools/libxl/xl_cmdimpl.c                        |  439 ++++++++++++++++-------
 tools/libxl/xl_cmdtable.c                       |    8 
 xen/arch/x86/traps.c                            |   13 -
 xen/common/domain.c                             |   48 ++-
 xen/common/domctl.c                             |   38 ++
 xen/common/keyhandler.c                         |    4 
 xen/common/sched_credit.c                       |  161 +++-----
 xen/common/sched_sedf.c                         |    2 
 xen/common/schedule.c                           |   56 ++-
 xen/common/wait.c                               |   10 -
 xen/include/public/domctl.h                     |   15 +
 xen/include/xen/sched.h                         |   14 -
 26 files changed, 1515 insertions(+), 385 deletions(-)
 create mode 100755 tools/libxl/check-xl-vcpupin-parse
 create mode 100644 tools/libxl/check-xl-vcpupin-parse.data-example

-- 
Signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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