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>, Meng Xu <mengxu@cis.upenn.edu>,
	Jan Beulich <JBeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH 0/7] xen: sched: fix locking of {insert, remove}_vcpu()
Date: Thu, 08 Oct 2015 14:52:28 +0200	[thread overview]
Message-ID: <20151008124027.12522.42552.stgit@Solace.station> (raw)

Hi everyone,

This series originates from this other one:

 http://lists.xen.org/archives/html/xen-devel/2015-09/msg03811.html

And, more specifically, from the review subthread of patch 3 (Jan's comments,
mainly):

 http://lists.xen.org/archives/html/xen-devel/2015-09/msg03812.html
 http://lists.xen.org/archives/html/xen-devel/2015-10/msg00023.html

In fact, when reworking it, according to the review comments I got, I thought
that the locking issues in insert_vcpu() and remove_vcpu() could well deserve a
series on their own.

Both the paths (vCPU insertion and removel) suffer from locking related bugs,
which are being fixed by patches 1 and 2 of this series.  Without these two
patches, sched_move_domain() ends up doing some runqueue manipulation _without_
holding the approaprite lock, for some schedulers (which include Credit).

I haven't seen the bug trigger. Actually, I haven't tried much to mess things
up by means of it, TBH, but, in principle, it's possible.  Patches 1 and 2 are,
therefore, both candidates for being backported, I guess.

The rest of the series is basically cleanups. Patch 3 tries to make that whole
'insert vCPU' situation more clear, consistent, and easy to understand.

Patch 4 and 5 simplify both Credit2 and RTDS schedulers a (really really) small
bit, by removing the (non necessary) list of vCPUs from the scheduling specific
domain data structure, and, of course, the burden of having to manage it.

Patch 6 and 7 are, literally, (dump) output cleanups.

There is a branch available with this series applied at:

 git://xenbits.xen.org/people/dariof/xen.git  rel/sched/fix-vcpu-ins-rem
 http://xenbits.xen.org/gitweb/?p=people/dariof/xen.git;a=shortlog;h=refs/heads/rel/sched/fix-vcpu-ins-rem

Regards,
Dario
---
Dario Faggioli (7):
      xen: sched: fix locking of remove_vcpu() in credit1
      xen: sched: fix locking for insert_vcpu() in credit1 and RTDS
      xen: sched: better handle (not) inserting idle vCPUs in runqueues
      xen: sched: get rid of the per domain vCPU list in RTDS
      xen: sched: get rid of the per domain vCPU list in Credit2
      xen: sched: fix an 'off by one \t' in credit2 debug dump
      xen: sched / cpupool: dump the actual value of NOW()

 xen/common/cpupool.c       |    2 +-
 xen/common/sched_credit.c  |   17 +++++++++++--
 xen/common/sched_credit2.c |   57 +++++++++++++++-----------------------------
 xen/common/sched_rt.c      |   43 +++++++++++++--------------------
 xen/common/schedule.c      |   27 ++++++++-------------
 5 files changed, 63 insertions(+), 83 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)

             reply	other threads:[~2015-10-08 12:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 12:52 Dario Faggioli [this message]
2015-10-08 12:52 ` [PATCH 1/7] xen: sched: fix locking of remove_vcpu() in credit1 Dario Faggioli
2015-10-08 13:16   ` Andrew Cooper
2015-10-08 12:52 ` [PATCH 2/7] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS Dario Faggioli
2015-10-08 13:18   ` Andrew Cooper
2015-10-08 15:16   ` George Dunlap
2015-10-08 15:49     ` Dario Faggioli
2015-10-08 20:12       ` Dario Faggioli
2015-10-08 12:52 ` [PATCH 3/7] xen: sched: better handle (not) inserting idle vCPUs in runqueues Dario Faggioli
2015-10-08 15:27   ` George Dunlap
2015-10-08 15:39     ` Dario Faggioli
2015-10-09  5:31   ` Juergen Gross
2015-10-08 12:52 ` [PATCH 4/7] xen: sched: get rid of the per domain vCPU list in RTDS Dario Faggioli
2015-10-08 13:47   ` Andrew Cooper
2015-10-08 15:31   ` George Dunlap
2015-10-08 12:53 ` [PATCH 5/7] xen: sched: get rid of the per domain vCPU list in Credit2 Dario Faggioli
2015-10-08 13:10   ` Andrew Cooper
2015-10-08 13:17     ` Dario Faggioli
2015-10-08 13:56   ` Andrew Cooper
2015-10-08 15:32     ` Dario Faggioli
2015-10-08 15:39       ` Andrew Cooper
2015-10-08 15:40   ` George Dunlap
2015-10-08 12:53 ` [PATCH 6/7] xen: sched: fix an 'off by one \t' in credit2 debug dump Dario Faggioli
2015-10-08 15:42   ` George Dunlap
2015-10-08 15:59     ` Dario Faggioli
2015-10-08 12:53 ` [PATCH 7/7] xen: sched / cpupool: dump the actual value of NOW() Dario Faggioli
2015-10-08 13:12   ` Andrew Cooper
2015-10-08 15:37     ` Jan Beulich
2015-10-09  5:09   ` Juergen Gross

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=20151008124027.12522.42552.stgit@Solace.station \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=mengxu@cis.upenn.edu \
    --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).