Re: Periodic rant about SCHED_ULE

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 23 Mar 2023 23:13:40 UTC
Konstantin Belousov <kostikbel_at_gmail.com> wrote on
Date: Thu, 23 Mar 2023 20:54:07 UTC :

> On Thu, Mar 23, 2023 at 05:42:22PM +0100, Mateusz Guzik wrote:
> > On 3/23/23, Konstantin Belousov <kostikbel@gmail.com> wrote:
> > > On Thu, Mar 23, 2023 at 04:15:21AM +0100, Mateusz Guzik wrote:
> > >> So I also ran the following setup: 8 core vm doing -j 8 buildkernel,
> > >> while 8 nice -n 20 processes are cpu-bound. After the build ends
> > >> workers report how many ops they did in that time.
> > > Why nice? Did you tried with the idle class instead?
> > >
> > 
> > The original message reported numbers with -n 20 and it is not
> > particularly unusual.
> I do not think we should target this level of feature compatibility with
> the historic behavior. nice -20 was not guaranteed to behave the way it
> is requested in this thread ("only use CPU when no other threads are
> runnable"). Instead, it is the declared behavior of the idle class.

How common is the "idle class" in BSD's, Unix, Linux, etc.?
Is it something rather FreeBSD specific for the way code
must be set up?

(I'm not claiming that the "only use CPU when no other threads
are runnable" is the proper goal for "nice". But the sizable
variability in the consequences of using nice in the 2
schedulers could of itself be an issue.)

> If idle class is broken, then it is indeed should be fixed. But not
> nice -20, IMO.

I end up wondering how much this would mean ports and such
would need more FreeBSD-specific changes.

===
Mark Millard
marklmi at yahoo.com