sched: Improve logging if KIST is disabled

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2017-09-14 16:04:47 -04:00
parent 0d0b677b64
commit c910610701

View File

@ -293,10 +293,17 @@ select_scheduler(void)
goto end; goto end;
case SCHEDULER_KIST: case SCHEDULER_KIST:
if (!scheduler_can_use_kist()) { if (!scheduler_can_use_kist()) {
log_warn(LD_SCHED, "Scheduler KIST can't be used. Consider removing " #ifdef HAVE_KIST_SUPPORT
"it from Schedulers or if you have a tor built " if (get_options()->KISTSchedRunInterval == -1) {
"with KIST support, you should make sure " log_info(LD_SCHED, "Scheduler type KIST can not be used. It is "
"KISTSchedRunInterval is a non zero value"); "disabled because KISTSchedRunInterval=-1");
} else {
log_notice(LD_SCHED, "Scheduler type KIST has been disabled by "
"the consensus.");
}
#else /* HAVE_KIST_SUPPORT */
log_info(LD_SCHED, "Scheduler type KIST not built in");
#endif /* HAVE_KIST_SUPPORT */
continue; continue;
} }
the_scheduler = get_kist_scheduler(); the_scheduler = get_kist_scheduler();