All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] xen: sched_null: support soft affinity
@ 2017-06-29 12:56 Dario Faggioli
  2017-06-29 12:56 ` [PATCH 1/5] xen: sched: factor affinity helpers out of sched_credit.c Dario Faggioli
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Dario Faggioli @ 2017-06-29 12:56 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Stefano Stabellini

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@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-26 14:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 12:56 [PATCH 0/5] xen: sched_null: support soft affinity Dario Faggioli
2017-06-29 12:56 ` [PATCH 1/5] xen: sched: factor affinity helpers out of sched_credit.c Dario Faggioli
2017-06-29 12:56 ` [PATCH 2/5] xen: sched_null: check for pending tasklet work a bit earlier Dario Faggioli
2017-07-25 15:24   ` George Dunlap
2017-06-29 12:56 ` [PATCH 3/5] xen: sched-null: support soft-affinity Dario Faggioli
2017-07-25 15:50   ` George Dunlap
2017-06-29 12:56 ` [PATCH 4/5] xen: sched_null: add some tracing Dario Faggioli
2017-07-25 15:15   ` George Dunlap
2017-07-25 16:07     ` Dario Faggioli
2017-07-26 14:50   ` George Dunlap
2017-06-29 12:56 ` [PATCH 5/5] tools: tracing: handle null scheduler's events Dario Faggioli
2017-07-26 14:51   ` George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.