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

[Xen-devel] [PATCH 0/5] xen: sched_null: support soft affinity



In the null scheduler, we don't need either hard or soft affinity during online
scheduling operations.  In fact, the vCPUs are statically assigned to the
pCPUs, and hence there's no scope for checking or enforcing any affinity.

We, however, use hard-affinity for 'placement', i.e., for deciding to what pCPU
to statically assign a vCPU.  Let's, therefore, use soft-affinity too, for the
same purpose. Of course, in this case, if there's no free pCPU within the
vCPU's soft-affinity, we go checking the hard-affinity, instead of putting the
vCPU in the waitqueue.

This is particularly important because, as of now, libxl uses set a domain's
soft-affinity, if the automatic NUMA placement logic run at domain creation
succeds to find an ideal collocation for the domain, and Xen uses that for
allocating the domain's memory.

Supporting soft-affinity like this would therefore mean that, even when using
the null scheduler, we try to keep the vCPUs close to their memory (on NUMA
hosts, of course).

Note also that this does has no impact on the online scheduling overhead,
because soft-affinity is only considered in cold-paths (like when a vCPU joins
the scheduler for the first time, or is manually moved between pCPUs by the
user).

Note that what is patch 1 in this series, is the same patch 1 of the 'Soft
affinity for Credit2' series:
 https://lists.xenproject.org/archives/html/xen-devel/2017-06/msg01795.html
 https://lists.xenproject.org/archives/html/xen-devel/2017-06/msg01796.html

Regards,
Dario
---
Dario Faggioli (5):
      xen: sched: factor affinity helpers out of sched_credit.c
      xen: sched_null: check for pending tasklet work a bit earlier
      xen: sched-null: support soft-affinity
      xen: sched_null: add some tracing
      tools: tracing: handle null scheduler's events

 tools/xentrace/formats     |    7 +
 tools/xentrace/xenalyze.c  |   65 ++++++++++++++
 xen/common/sched_credit.c  |   97 +++-----------------
 xen/common/sched_null.c    |  209 ++++++++++++++++++++++++++++++++++++--------
 xen/include/public/trace.h |    1 
 xen/include/xen/sched-if.h |   64 +++++++++++++
 6 files changed, 323 insertions(+), 120 deletions(-)
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

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

 


Rackspace

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