Date: Wed, 13 May 1998 20:41:28 +0200 (SAT) From: John Hay <jhay@mikom.csir.co.za> To: hackers@FreeBSD.ORG Subject: sched_setscheduler() usage? Message-ID: <199805131841.UAA10458@zibbi.mikom.csir.co.za>
next in thread | raw e-mail | index | archive | help
Hi, The latest versions of ntp4 detects that we have sched_setscheduler(2) and try to use it with this piece of code: ------------------- # if defined(HAVE_SCHED_SETSCHEDULER) { struct sched_param sched; sched.sched_priority = sched_get_priority_min(SCHED_FIFO); if ( sched_setscheduler(0, SCHED_FIFO, &sched) == -1 ) { msyslog(LOG_ERR, "sched_setscheduler(): %m"); } } # else /* not HAVE_SCHED_SETSCHEDULER */ ------------------- The problem is that this seems to give ntpd a lower priority (something like idle priority) because any normal priority program that is cpu intensive will starve ntpd totally. So should this piece of code result in higher priority than normal programs (like the rtprio stuff) or is this piece of code broken? I assume the ntp guys wanted ntpd to be scheduled at a relatively high priority to keep delays and jitter to a minimum. Another question, where does the sched_setscheduler() priorities fit in with the rest of our priorities? I have started to look through the kernel code, but because I don't know what its relationship to the rest of the priorities should be, it is difficult to figure out where the problem is. John -- John Hay -- John.Hay@mikom.csir.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805131841.UAA10458>