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;
}
fprintf(stdout, "disk name: %s\n"
"scheduler: %s\n"
- "disk aggregate throughput: %f\n"
+ "disk aggregate throughput: %f KiB/s\n"
"scheduling budget: %d\n",
disk_name, SYSFS_BFQ_NAME, disk.throughput, disk.budget);