[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen: sched: make sure a pCPU added to a pool runs the scheduler ASAP



commit d92b0e7fca263e0671940d0d446c64e850ca595c
Author:     Dario Faggioli <dario.faggioli@xxxxxxxxxx>
AuthorDate: Fri Apr 7 14:28:08 2017 +0200
Commit:     George Dunlap <george.dunlap@xxxxxxxxxx>
CommitDate: Fri Apr 7 15:53:14 2017 +0100

    xen: sched: make sure a pCPU added to a pool runs the scheduler ASAP
    
    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@xxxxxxxxxx>
    Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
 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;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.