Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2013 10:09:59 -0500
From:      Eric van Gyzen <eric@vangyzen.net>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-stable@FreeBSD.org, dave@mischler.com
Subject:   Re: unexpected idprio 31 behavior on 9.2-BETA2 and 9.2-RC1
Message-ID:  <52026347.9030005@vangyzen.net>
In-Reply-To: <52020EAF.6000301@FreeBSD.org>
References:  <1375737316.96778.10.camel@firkin.mischler.com> <52020EAF.6000301@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/07/2013 04:09, Andriy Gapon wrote:
> on 06/08/2013 00:15 Dave Mischler said the following:
>> I have an i5-2500 machine 8GB RAM now running 9.2-RC1 amd64 with the
>> GENERIC kernel. Today, while still running 9.2-BETA2, I updated my
>> source tree and started building world with idprio 31 and I looked back
>> a while later and all the CPU cores and disk were essentially idle, and
>> hardly any progress had been made on the build. I stopped and restarted
>> the build without the idle priority setting and it ran fine. Anybody
>> else seen any of this? Anybody know about any fairly recent changes that
>> might account for it?
>>
>> I did a "rm -rf /usr/src /usr/obj" and loaded a new source tree before
>> going to RC1.  I still see odd behavior at RC1.  Sometimes it works just
>> like it should (i.e. compute bound processes use most/all of the
>> available CPU time), but a lot of the time both the CPU and disk are
>> idle (e.g. CPU 97.8% idle, disk 1% busy per systat).  I don't think I
>> ever saw this behavior before while running "make buildworld -j4".  Can
>> anyone else confirm/rebut my findings?  Thanks.
> Are you sure that you really want to use idprio for a goal you want to achieve?
> If yes, are you sure that you want to use idprio 31 specifically?
> With sched_ule idprio 31 is equivalent to priority of a completely idle system.
>  So the scheduler is in its right to run the idle ("do nothing") thread instead
> of your thread(s).

That sounds like a bug to me, or a POLA violation at least.  A user
thread should never have the same priority as the idle threads, because
a user thread, by definition, has work to do.

>From the rtprio(1) examples:

     To make depend while not disturbing other machine usage:
           idprio 31 make depend

> P.S.
> https://wiki.freebsd.org/AvgThreadPriorityRanges

Nice!  Thank you for writing it and sending the link.

Eric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52026347.9030005>