[xen master] xen: sched_null: check for pending tasklet work a bit earlier

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[xen master] xen: sched_null: check for pending tasklet work a bit earlier

patchbot
commit 1061335473fd2199218160920f9bef2609e36b92
Author:     Dario Faggioli <[hidden email]>
AuthorDate: Wed Jul 26 15:55:27 2017 +0100
Commit:     George Dunlap <[hidden email]>
CommitDate: Wed Jul 26 15:55:27 2017 +0100

    xen: sched_null: check for pending tasklet work a bit earlier
   
    Whether or not there's pending tasklet work to do, it's
    something we know from the tasklet_work_scheduled parameter.
   
    Deal with that as soon as possible, like all other schedulers
    do.
   
    Signed-off-by: Dario Faggioli <[hidden email]>
    Reviewed-by: George Dunlap <[hidden email]>
---
 xen/common/sched_null.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c
index 705c00a..610a150 100644
--- a/xen/common/sched_null.c
+++ b/xen/common/sched_null.c
@@ -641,7 +641,10 @@ static struct task_slice null_schedule(const struct scheduler *ops,
     SCHED_STAT_CRANK(schedule);
     NULL_VCPU_CHECK(current);
 
-    ret.task = per_cpu(npc, cpu).vcpu;
+    if ( tasklet_work_scheduled )
+        ret.task = idle_vcpu[cpu];
+    else
+        ret.task = per_cpu(npc, cpu).vcpu;
     ret.migrated = 0;
     ret.time = -1;
 
@@ -663,9 +666,7 @@ static struct task_slice null_schedule(const struct scheduler *ops,
         spin_unlock(&prv->waitq_lock);
     }
 
-    if ( unlikely(tasklet_work_scheduled ||
-                  ret.task == NULL ||
-                  !vcpu_runnable(ret.task)) )
+    if ( unlikely(ret.task == NULL || !vcpu_runnable(ret.task)) )
         ret.task = idle_vcpu[cpu];
 
     NULL_VCPU_CHECK(ret.task);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog
Loading...