return qos_rv_int(rv);
}
- printf("Created AQCPU VRES(sid=%d period=%lld us, budget=%lld us)\n",
+ ul_logdeb("Created AQCPU VRES(sid=%d period=%lld us, budget=%lld us)\n",
sid, cpu_params.P, cpu_params.Q);
if ((vres->priv = malloc(sizeof(qres_sid_t)))) {
memcpy(vres->priv, &sid, sizeof(qres_sid_t));
if (qrv != QOS_OK) {
return qos_rv_int(qrv);
}
- printf("Canceled AQCPU VRES(sid=%d)\n",sid);
+ ul_logdeb("Canceled AQCPU VRES(sid=%d)\n",sid);
free(vres->priv);
return 0;
rv = qsup_reserve_spare(r2bw(cpu_params.Q, cpu_params.P));
if (rv != QOS_OK) return qos_rv_int(rv);
- printf("Created AQCPU spare (period=%lld us, budget=%lld us)\n",
+ ul_logdeb("Created AQCPU spare (period=%lld us, budget=%lld us)\n",
cpu_params.P, cpu_params.Q);
if ((vres->priv = malloc(sizeof(qres_sid_t)))) {
memcpy(vres->priv, &fake_sid, sizeof(qres_sid_t));
period = fosa_rel_time_to_nsec(basic->period);
budget = fosa_rel_time_to_nsec(basic->budget);
- printf("processing: id=%s, period=%ld ms, budget=%ld ms\n",
- id, period, budget);
+ ul_logmsg("processing: id=%s, period=%ld us, budget=%ld us\n",
+ id, period/1000, budget/1000);
if (c->contract == c->new) {
int ret;
ret = fres_contract_add_disk_sched(c->contract,
disk_sched);
if (ret) {
- fprintf(stderr,
- "Cannot add disk_sched block\n");
+ ul_logerr("Cannot add disk_sched block\n");
free(disk_sched);
return -1;
}
} else {
disk_sched = fres_contract_get_disk_sched(c->contract);
if (!disk_sched) {
- fprintf(stderr,
- "disk_sched is not present\n");
+ ul_logerr("disk_sched is not present\n");
return -1;
}
}
sum_weight += disk_sched->weight;
}
- printf("sum_weight=%ld, max_weight=%d\n",
- sum_weight,
- DISKBFQ_WEIGHT_MAX);
+ ul_logmsg("sum_weight=%ld, max_weight=%d\n",
+ sum_weight,
+ DISKBFQ_WEIGHT_MAX);
*schedulable = sum_weight < DISKBFQ_WEIGHT_MAX;
- printf("=>%s\n", (*schedulable) ? "schedulable" : "not schedulable");
+ ul_logmsg("=> %s\n", (*schedulable) ? "schedulable" : "not schedulable");
return 0;
}