[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen master] sched: removal of redundant check in Credit
From: patchbot () xen ! org
Date: 2016-12-25 6:05:27
Message-ID: E1cL1vz-00006y-SS () xenbits ! xenproject ! org
[Download RAW message or body]
commit 7844ec6b5475005ebef5c1767546482838993b7c
Author: Praveen Kumar <kpraveen.lkml@gmail.com>
AuthorDate: Wed Dec 21 16:53:35 2016 +0100
Commit: Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Dec 21 16:53:35 2016 +0100
sched: removal of redundant check in Credit
The patch gets rid of a redundant check in csched_vcpu_acct. In fact,
the function is only called from csched_tick, which already checks
that current is not the idle vcpu. The patch also adds an ASSERT to
the same effect, in order to make assumption ( i.e., no calling this
on idle vcpus) even more clear and as a guard for future mis-use.
Signed-off-by: Praveen Kumar <kpraveen.lkml@gmail.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
---
xen/common/sched_credit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index fc3a321..dfe8545 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -941,6 +941,7 @@ csched_vcpu_acct(struct csched_private *prv, unsigned int cpu)
ASSERT( current->processor == cpu );
ASSERT( svc->sdom != NULL );
+ ASSERT( !is_idle_vcpu(svc->vcpu) );
/*
* If this VCPU's priority was boosted when it last awoke, reset it.
@@ -957,8 +958,7 @@ csched_vcpu_acct(struct csched_private *prv, unsigned int cpu)
/*
* Update credits
*/
- if ( !is_idle_vcpu(svc->vcpu) )
- burn_credits(svc, NOW());
+ burn_credits(svc, NOW());
/*
* Put this VCPU and domain back on the active list if it was
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
https://lists.xenproject.org/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic