Skip to content

xen: sched_null: support soft affinity

Dario Faggioli xen-devel 1 version In review

Get series with b4
b4 am 149874017405.524.14075439009139766753.stgit@Solace

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5xen: sched: factor affinity helpers out of sched_credit.cxen/common/sched_credit.c xen/include/xen/sched-if.h+79 -820 replies
2/5xen: sched_null: check for pending tasklet work a bit earlierxen/common/sched_null.c+5 -41 reply
3/5xen: sched-null: support soft-affinityxen/common/sched_null.c+77 -331 reply
4/5xen: sched_null: add some tracingxen/common/sched_null.c xen/include/public/trace.h+92 -33 replies
5/5tools: tracing: handle null scheduler's eventstools/xentrace/formats tools/xentrace/xenalyze.c+72 -01 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchGeorge Dunlap
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [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
[email protected]
https://lists.xen.org/xen-devel