Lines Matching refs:snext

1594                          struct csched2_vcpu *snext)  in reset_credit()  argument
1618 if ( snext->credit < -CSCHED2_CREDIT_INIT ) in reset_credit()
1619 m += (-snext->credit) / CSCHED2_CREDIT_INIT; in reset_credit()
3152 struct csched2_vcpu *snext, s_time_t now) in csched2_runtime() argument
3164 if ( is_idle_vcpu(snext->vcpu) ) in csched2_runtime()
3181 if ( snext->vcpu->is_running ) in csched2_runtime()
3182 ratelimit_min = snext->vcpu->runstate.state_entry_time + in csched2_runtime()
3189 rt_credit = snext->credit; in csched2_runtime()
3202 rt_credit = snext->credit - swait->credit; in csched2_runtime()
3217 time = c2t(rqd, rt_credit, snext); in csched2_runtime()
3224 if ( has_cap(snext) ) in csched2_runtime()
3225 time = snext->budget < time ? snext->budget : time; in csched2_runtime()
3255 struct csched2_vcpu *snext = NULL; in runq_candidate() local
3263 snext = scurr; in runq_candidate()
3334 snext = scurr; in runq_candidate()
3336 snext = csched2_vcpu(idle_vcpu[cpu]); in runq_candidate()
3379 && snext->credit + CSCHED2_MIGRATE_RESIST > svc->credit ) in runq_candidate()
3392 if ( (yield || svc->credit > snext->credit) && in runq_candidate()
3394 snext = svc; in runq_candidate()
3407 d.dom = snext->vcpu->domain->domain_id; in runq_candidate()
3408 d.vcpu = snext->vcpu->vcpu_id; in runq_candidate()
3409 d.credit = snext->credit; in runq_candidate()
3410 d.tickled_cpu = snext->tickled_cpu; in runq_candidate()
3417 if ( unlikely(snext->tickled_cpu != -1 && snext->tickled_cpu != cpu) ) in runq_candidate()
3425 ASSERT(snext->budget >= 0); in runq_candidate()
3427 return snext; in runq_candidate()
3441 struct csched2_vcpu *snext = NULL; in csched2_schedule() local
3517 snext = csched2_vcpu(idle_vcpu[cpu]); in csched2_schedule()
3520 snext = runq_candidate(rqd, scurr, cpu, now, &skipped_vcpus); in csched2_schedule()
3524 if ( snext != scurr in csched2_schedule()
3532 if ( !is_idle_vcpu(snext->vcpu) ) in csched2_schedule()
3535 if ( snext != scurr ) in csched2_schedule()
3537 ASSERT(snext->rqd == rqd); in csched2_schedule()
3538 ASSERT(!snext->vcpu->is_running); in csched2_schedule()
3540 runq_remove(snext); in csched2_schedule()
3541 __set_bit(__CSFLAG_scheduled, &snext->flags); in csched2_schedule()
3558 if ( skipped_vcpus == 0 && snext->credit <= CSCHED2_CREDIT_RESET ) in csched2_schedule()
3560 reset_credit(ops, cpu, now, snext); in csched2_schedule()
3571 snext->start_time = now; in csched2_schedule()
3572 snext->tickled_cpu = -1; in csched2_schedule()
3575 if ( snext->vcpu->processor != cpu ) in csched2_schedule()
3577 snext->credit += CSCHED2_MIGRATE_COMPENSATION; in csched2_schedule()
3578 snext->vcpu->processor = cpu; in csched2_schedule()
3611 ret.time = csched2_runtime(ops, cpu, snext, now); in csched2_schedule()
3612 ret.task = snext->vcpu; in csched2_schedule()