xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Juergen Gross <jgross@suse.com>,
	Anshul Makkar <anshul.makkar@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH 0/5] xen: sched: scheduling (mostly, Credit2) and cpupool fixes and improvements
Date: Tue, 17 Jan 2017 18:26:31 +0100	[thread overview]
Message-ID: <148467379229.27920.2367500429219327194.stgit@Solace.fritz.box> (raw)

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

             reply	other threads:[~2017-01-17 17:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17 17:26 Dario Faggioli [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=148467379229.27920.2367500429219327194.stgit@Solace.fritz.box \
    --to=dario.faggioli@citrix.com \
    --cc=anshul.makkar@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).