Re: Periodic rant about SCHED_ULE

From: RW via freebsd-hackers <freebsd-hackers_at_freebsd.org>
Date: Wed, 21 Jul 2021 23:43:13 +0100
On Mon, 19 Jul 2021 09:14:34 +0300
Andriy Gapon wrote:

> On 19/07/2021 03:37, RW via freebsd-hackers wrote:
> > I haven't got time to look into this in detail but from a cursory
> > examination it looks like there must be some kind of translation
> > between the PRI values seen in top and the priorities used in the
> > scheduler.  
> 
> Yes. top's priority is the real priority - 100.

The test for preemption is 

   pri <= preempt_thresh

I suspect that the defaults have been set up on the assumption of

   pri < preempt_thresh

With and without  FULL_PREEMPTION the defaults are 224 and 80
respectively. Both of these are one level outside a range. There may
possibly be a good reason for 80, but 224 means that one idle level is
included. 
Received on Wed Jul 21 2021 - 22:43:13 UTC

Original text of this message