All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] xen: sched: scheduling (mostly, Credit2) and cpupool fixes and improvements
@ 2017-01-17 17:26 Dario Faggioli
  2017-01-17 17:26 ` [PATCH 1/5] xen: credit2: use the correct scratch cpumask Dario Faggioli
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Dario Faggioli @ 2017-01-17 17:26 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Juergen Gross, Anshul Makkar, Jan Beulich

Hello,

This series fixes a few issues issues, related to Credit2 and to scheduling and
cpupools interactions in a more general fashion.

The first 3 patches cures (symptoms of) bugs in Credit2, and should be
backported to 4.8 (it should not be too hard to do so, and I can help with
that, if necessary).

In fact, patch 1 ("xen: credit2: use the correct scratch cpumask."), fixes a
buggy behavior identified by Jan here [1]. No Oops, or ASSERT were triggering,
but there's the risk of incurring in nonoptimal or unpredictable scheduling
behavior, when multiple cpupools, with different schedulers, are used.

Patch 2 ("xen: credit2: never consider CPUs outside of our cpupool.") is
necessary because I thought we were already taking all the proper measure to
have Credit2 vCPUs live in their cpupool, but that wasn't the case. The patch
cures potential crash, so it's important, IMO, and should also be backported.
As noted in the extended changelog, while working on this, I identified some
unideal aspects of the interface and the interactions between cpupools and the
scheduler. Fixing that properly will require more work, if not a rethink of the
said interface.

Path 3 ("xen: credit2: fix shutdown/suspend when playing with cpupools.") also
fixes a bug which manifests itself when the host is shutdown or attempts
suspending with the BSP (CPU 0, as of now) not belonging to cpupool0 as it does
by default. This again manifests only when Credit2 is involved (see patch
description for more details), but is more general and could potentially affect
any scheduler that does a runqueue lock remapping and management similar to
what Credit2 does in that department. This is probably the most 'invasive'
(affects schedule.c), but I think it should also be backported.

The last 2 patches, OTOH, are improvements rather than bugfixes, and so they're
not backport candidates.

There is a git branch with the patch applied available here:

 * git://xenbits.xen.org/people/dariof/xen.git rel/sched/fix-credit2-cpupool
 * http://xenbits.xen.org/gitweb/?p=people/dariof/xen.git;a=shortlog;h=refs/heads/rel/sched/fix-credit2-cpupool
 * https://travis-ci.org/fdario/xen/builds/192726171

Thanks and Regards,
Dario

---
Dario Faggioli (5):
      xen: credit2: use the correct scratch cpumask.
      xen: credit2: never consider CPUs outside of our cpupool.
      xen: credit2: fix shutdown/suspend when playing with cpupools.
      xen: sched: impove use of cpumask scratch space in Credit1.
      xen: sched: simplify ACPI S3 resume path.

 xen/common/sched_credit.c  |    5 +-
 xen/common/sched_credit2.c |  110 ++++++++++++++++++++++++++++++++------------
 xen/common/schedule.c      |   48 ++++++++++++-------
 xen/include/xen/sched-if.h |    7 +++
 4 files changed, 118 insertions(+), 52 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] 28+ messages in thread

end of thread, other threads:[~2017-02-09 10:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 17:26 [PATCH 0/5] xen: sched: scheduling (mostly, Credit2) and cpupool fixes and improvements Dario Faggioli
2017-01-17 17:26 ` [PATCH 1/5] xen: credit2: use the correct scratch cpumask Dario Faggioli
2017-01-19 12:22   ` George Dunlap
2017-01-17 17:26 ` [PATCH 2/5] xen: credit2: never consider CPUs outside of our cpupool Dario Faggioli
2017-01-19  8:08   ` Juergen Gross
2017-01-19  8:22     ` Dario Faggioli
2017-01-23 14:40     ` George Dunlap
2017-01-24 12:35       ` Juergen Gross
2017-01-24 12:49         ` Dario Faggioli
2017-01-24 16:37           ` George Dunlap
2017-01-23 15:20   ` George Dunlap
2017-02-03  8:41   ` Jan Beulich
2017-02-03 15:27     ` Dario Faggioli
2017-02-03 15:40       ` Jan Beulich
2017-02-08 16:48         ` Dario Faggioli
2017-02-08 17:02           ` Jan Beulich
2017-02-08 18:55             ` Dario Faggioli
2017-02-09  9:17               ` Jan Beulich
2017-02-09  9:25                 ` Dario Faggioli
2017-02-09 10:32                 ` Dario Faggioli
2017-01-17 17:26 ` [PATCH 3/5] xen: credit2: fix shutdown/suspend when playing with cpupools Dario Faggioli
2017-01-23 15:42   ` George Dunlap
2017-01-17 17:27 ` [PATCH 4/5] xen: sched: impove use of cpumask scratch space in Credit1 Dario Faggioli
2017-01-18  9:45   ` Jan Beulich
2017-01-18  9:54     ` Dario Faggioli
2017-01-23 15:47   ` George Dunlap
2017-01-17 17:27 ` [PATCH 5/5] xen: sched: simplify ACPI S3 resume path Dario Faggioli
2017-01-23 15:52   ` 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.