All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Dario Faggioli <dfaggioli@suse.com>
Subject: [Xen-devel] [PATCH v2 4/9] xen/sched: remove special cases for free cpus in schedulers
Date: Wed,  8 Jan 2020 16:23:23 +0100	[thread overview]
Message-ID: <20200108152328.27194-5-jgross@suse.com> (raw)
In-Reply-To: <20200108152328.27194-1-jgross@suse.com>

With the idle scheduler now taking care of all cpus not in any cpupool
the special cases in the other schedulers for no cpupool associated
can be removed.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/credit.c  |  7 ++-----
 xen/common/sched/credit2.c | 30 ------------------------------
 2 files changed, 2 insertions(+), 35 deletions(-)

diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c
index 4329d9df56..6b04f8f71c 100644
--- a/xen/common/sched/credit.c
+++ b/xen/common/sched/credit.c
@@ -1690,11 +1690,8 @@ csched_load_balance(struct csched_private *prv, int cpu,
 
     BUG_ON(get_sched_res(cpu) != snext->unit->res);
 
-    /*
-     * If this CPU is going offline, or is not (yet) part of any cpupool
-     * (as it happens, e.g., during cpu bringup), we shouldn't steal work.
-     */
-    if ( unlikely(!cpumask_test_cpu(cpu, online) || c == NULL) )
+    /* If this CPU is going offline, we shouldn't steal work.  */
+    if ( unlikely(!cpumask_test_cpu(cpu, online)) )
         goto out;
 
     if ( snext->pri == CSCHED_PRI_IDLE )
diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c
index 65e8ab052e..849d254e04 100644
--- a/xen/common/sched/credit2.c
+++ b/xen/common/sched/credit2.c
@@ -2744,40 +2744,10 @@ static void
 csched2_unit_migrate(
     const struct scheduler *ops, struct sched_unit *unit, unsigned int new_cpu)
 {
-    struct domain *d = unit->domain;
     struct csched2_unit * const svc = csched2_unit(unit);
     struct csched2_runqueue_data *trqd;
     s_time_t now = NOW();
 
-    /*
-     * Being passed a target pCPU which is outside of our cpupool is only
-     * valid if we are shutting down (or doing ACPI suspend), and we are
-     * moving everyone to BSP, no matter whether or not BSP is inside our
-     * cpupool.
-     *
-     * And since there indeed is the chance that it is not part of it, all
-     * we must do is remove _and_ unassign the unit from any runqueue, as
-     * well as updating v->processor with the target, so that the suspend
-     * process can continue.
-     *
-     * It will then be during resume that a new, meaningful, value for
-     * v->processor will be chosen, and during actual domain unpause that
-     * the unit will be assigned to and added to the proper runqueue.
-     */
-    if ( unlikely(!cpumask_test_cpu(new_cpu, cpupool_domain_master_cpumask(d))) )
-    {
-        ASSERT(system_state == SYS_STATE_suspend);
-        if ( unit_on_runq(svc) )
-        {
-            runq_remove(svc);
-            update_load(ops, svc->rqd, NULL, -1, now);
-        }
-        _runq_deassign(svc);
-        sched_set_res(unit, get_sched_res(new_cpu));
-        return;
-    }
-
-    /* If here, new_cpu must be a valid Credit2 pCPU, and in our affinity. */
     ASSERT(cpumask_test_cpu(new_cpu, &csched2_priv(ops)->initialized));
     ASSERT(cpumask_test_cpu(new_cpu, unit->cpu_hard_affinity));
 
-- 
2.16.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2020-01-08 15:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 15:23 [Xen-devel] [PATCH v2 0/9] xen: scheduler cleanups Juergen Gross
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 1/9] xen/sched: move schedulers and cpupool coding to dedicated directory Juergen Gross
2020-01-22 13:03   ` Dario Faggioli
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 2/9] xen/sched: make sched-if.h really scheduler private Juergen Gross
2020-01-14 14:27   ` Jan Beulich
2020-01-14 14:33     ` Jürgen Groß
2020-01-14 14:39       ` Jan Beulich
2020-01-14 14:50         ` Jürgen Groß
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 3/9] xen/sched: cleanup sched.h Juergen Gross
2020-01-14 15:38   ` Jan Beulich
2020-01-14 15:42     ` Jürgen Groß
2020-01-08 15:23 ` Juergen Gross [this message]
2020-01-22 13:06   ` [Xen-devel] [PATCH v2 4/9] xen/sched: remove special cases for free cpus in schedulers Dario Faggioli
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 5/9] xen/sched: use scratch cpumask instead of allocating it on the stack Juergen Gross
2020-01-09  6:21   ` Meng Xu
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 6/9] xen/sched: replace null scheduler percpu-variable with pdata hook Juergen Gross
2020-01-22 13:04   ` Dario Faggioli
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 7/9] xen/sched: switch scheduling to bool where appropriate Juergen Gross
2020-01-09  6:23   ` Meng Xu
2020-01-22 12:56   ` Dario Faggioli
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 8/9] xen/sched: eliminate sched_tick_suspend() and sched_tick_resume() Juergen Gross
2020-01-08 15:23 ` [Xen-devel] [PATCH v2 9/9] xen/sched: add const qualifier where appropriate Juergen Gross
2020-01-09  6:00   ` Meng Xu
2020-01-22 13:11 ` [Xen-devel] [PATCH v2 0/9] xen: scheduler cleanups Dario Faggioli

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=20200108152328.27194-5-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=dfaggioli@suse.com \
    --cc=george.dunlap@eu.citrix.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 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.