Re: [Xen-devel] [PATCH v2 2/2] xen: credit1: no need to check for is_idle_vcpu() in csched_vcpu_acct()

2016-08-19 Thread George Dunlap
On 18/08/16 11:00, Dario Faggioli wrote:
> In fact, csched_vcpu_acct() is called by csched_tick()
> _only_ on non idle vcpus already.
> 
> There's even an ASSERT() already in place at the top
> of it which, by checking that svc->sdom is not NULL,
> guarantees that the function is not being called on
> the idle domain.
> 
> Signed-off-by: Dario Faggioli 

Acked-by: George Dunlap 


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


[Xen-devel] [PATCH v2 2/2] xen: credit1: no need to check for is_idle_vcpu() in csched_vcpu_acct()

2016-08-18 Thread Dario Faggioli
In fact, csched_vcpu_acct() is called by csched_tick()
_only_ on non idle vcpus already.

There's even an ASSERT() already in place at the top
of it which, by checking that svc->sdom is not NULL,
guarantees that the function is not being called on
the idle domain.

Signed-off-by: Dario Faggioli 
---
Cc: George Dunlap 
---
 xen/common/sched_credit.c |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index daace81..71a8b1d 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -966,11 +966,8 @@ csched_vcpu_acct(struct csched_private *prv, unsigned int 
cpu)
  svc->vcpu->vcpu_id);
 }
 
-/*
- * Update credits
- */
-if ( !is_idle_vcpu(svc->vcpu) )
-burn_credits(svc, NOW());
+/* Update credits. */
+burn_credits(svc, NOW());
 
 /*
  * Put this VCPU and domain back on the active list if it was


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