s_time_t tot_budget; /* Total amount of budget */
s_time_t budget; /* Currently available budget */
- struct timer *repl_timer; /* Timer for periodic replenishment of budget */
+ struct timer repl_timer; /* Timer for periodic replenishment of budget */
s_time_t next_repl; /* Time at which next replenishment occurs */
struct list_head parked_vcpus; /* List of CPUs waiting for budget */
unpark_parked_vcpus(sdom->dom->cpupool->sched, &parked);
out:
- set_timer(sdom->repl_timer, sdom->next_repl);
+ set_timer(&sdom->repl_timer, sdom->next_repl);
}
#ifndef NDEBUG
*/
sdom->budget = sdom->tot_budget;
sdom->next_repl = NOW() + CSCHED2_BDGT_REPL_PERIOD;
- set_timer(sdom->repl_timer, sdom->next_repl);
+ set_timer(&sdom->repl_timer, sdom->next_repl);
/*
* Now, let's enable budget accounting for all the vCPUs.
{
LIST_HEAD(parked);
- stop_timer(sdom->repl_timer);
+ stop_timer(&sdom->repl_timer);
/* Disable budget accounting for all the vCPUs. */
for_each_vcpu ( d, v )
if ( sdom == NULL )
return NULL;
- sdom->repl_timer = xzalloc(struct timer);
- if ( sdom->repl_timer == NULL )
- {
- xfree(sdom);
- return NULL;
- }
-
/* Initialize credit, cap and weight */
INIT_LIST_HEAD(&sdom->sdom_elem);
sdom->dom = dom;
sdom->cap = 0U;
sdom->nr_vcpus = 0;
- init_timer(sdom->repl_timer, replenish_domain_budget, sdom,
+ init_timer(&sdom->repl_timer, replenish_domain_budget, sdom,
cpumask_any(cpupool_domain_cpumask(dom)));
spin_lock_init(&sdom->budget_lock);
INIT_LIST_HEAD(&sdom->parked_vcpus);
struct csched2_dom *sdom = data;
struct csched2_private *prv = csched2_priv(ops);
- kill_timer(sdom->repl_timer);
+ kill_timer(&sdom->repl_timer);
write_lock_irqsave(&prv->lock, flags);
write_unlock_irqrestore(&prv->lock, flags);
- xfree(sdom->repl_timer);
xfree(data);
}