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

[Xen-changelog] [xen master] credit: recalculate per-cpupool credits when updating timeslice



commit ffc342fbb060cd753fc3a5f6fb6f550dd29a2637
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Feb 2 14:03:40 2016 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Feb 2 14:03:40 2016 +0100

    credit: recalculate per-cpupool credits when updating timeslice
    
    When modifying the timeslice of the credit scheduler in a cpupool the
    cpupool global credit value (n_cpus * credits_per_tslice) isn't
    recalculated. This will lead to wrong scheduling decisions later.
    
    Do the recalculation when updating the timeslice.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Tested-by: Alan.Robinson <alan.robinson@xxxxxxxxxxxxxx>
    Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
---
 xen/common/sched_credit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index 8fbbd54..671bbee 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -1092,6 +1092,7 @@ __csched_set_tslice(struct csched_private *prv, unsigned 
timeslice)
         prv->ticks_per_tslice = 1;
     prv->tick_period_us = prv->tslice_ms * 1000 / prv->ticks_per_tslice;
     prv->credits_per_tslice = CSCHED_CREDITS_PER_MSEC * prv->tslice_ms;
+    prv->credit = prv->credits_per_tslice * prv->ncpus;
 }
 
 static int
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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