All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	George Dunlap <george.dunlap@citrix.com>
Subject: [PATCH v3 2/5] xen: sched: make sure a pCPU added to a pool runs the scheduler ASAP
Date: Fri, 07 Apr 2017 14:28:08 +0200	[thread overview]
Message-ID: <149156808822.26316.2743892096051912007.stgit@Solace.fritz.box> (raw)
In-Reply-To: <149156740206.26316.13423335183353072520.stgit@Solace.fritz.box>

When a pCPU is added to a cpupool, the pool's scheduler
should immediately run on it so, for instance, any runnable
but not running vCPU can start executing there.

This currently does not happen. Make it happen by raising
the scheduler softirq directly from the function that
sets up the new scheduler for the pCPU.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
---
Cc: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/common/schedule.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 5b44a56..646f3d9 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1823,6 +1823,9 @@ int schedule_cpu_switch(unsigned int cpu, struct cpupool *c)
 
  out:
     per_cpu(cpupool, cpu) = c;
+    /* When a cpu is added to a pool, trigger it to go pick up some work */
+    if ( c != NULL )
+        cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ);
 
     return 0;
 }


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

  parent reply	other threads:[~2017-04-07 12:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 12:27 [PATCH v3 0/5] The 'null' Scheduler Dario Faggioli
2017-04-07 12:28 ` [PATCH v3 1/5] xen: sched: improve robustness (and rename) DOM2OP() Dario Faggioli
2017-04-07 12:28 ` Dario Faggioli [this message]
2017-04-07 12:28 ` [PATCH v3 3/5] xen: sched: introduce the 'null' semi-static scheduler Dario Faggioli
2017-04-07 12:28 ` [PATCH v3 4/5] xen: sched_null: support for hard affinity Dario Faggioli
2017-04-07 14:57   ` George Dunlap
2017-04-07 12:28 ` [PATCH v3 5/5] tools: sched: add support for 'null' scheduler Dario Faggioli
2017-04-07 14:57   ` 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=149156808822.26316.2743892096051912007.stgit@Solace.fritz.box \
    --to=dario.faggioli@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=sstabellini@kernel.org \
    --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.