From 0d94b02b5e1d4857e8af8ceedfb2af467d7a0a2a Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Sat, 1 Apr 2017 16:13:18 +0200 Subject: kern: Fix reporting the minimum quantum used for scheduling. * kern/host.c (host_info): Scale 'min_quantum' by 'tick', then convert to milliseconds. --- kern/host.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kern/host.c b/kern/host.c index 57280c49..3271b0cd 100644 --- a/kern/host.c +++ b/kern/host.c @@ -154,7 +154,7 @@ kern_return_t host_info( { host_sched_info_t sched_info; extern int min_quantum; - /* minimum quantum, in microseconds */ + /* minimum quantum, in ticks */ /* * Return scheduler information. @@ -165,8 +165,9 @@ kern_return_t host_info( sched_info = (host_sched_info_t) info; sched_info->min_timeout = tick / 1000; - sched_info->min_quantum = min_quantum / 1000; /* convert microseconds to milliseconds */ + sched_info->min_quantum = min_quantum * tick / 1000; + /* convert ticks to milliseconds */ *count = HOST_SCHED_INFO_COUNT; return KERN_SUCCESS; -- cgit v1.2.3