Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 2002 13:26:19 -0700
From:      Ian <freebsd@damnhippie.dyndns.org>
To:        <hackers@freebsd.org>
Subject:   Re: idprio
Message-ID:  <B8C6277B.B79E%freebsd@damnhippie.dyndns.org>
In-Reply-To: <3CA0D3FE.8113515C@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> Dan Nelson wrote:
>> In the last episode (Mar 26), Andrew said:
>>> On Tue, 26 Mar 2002, Volker Stolz wrote:
>>>> Under FreeBSD system calls are currently never preempted, therefore
>>>> non- realtime processes can starve realtime processes, or idletime
>>>> processes can starve normal priority processes.
>>> 
>>> Even so an idprio process can't be worse than a normal process.
>> 
>> Sure it can, if the idprio process has locked a vnode trying to update
>> the contents of a file, and another non-idprio process starts consuming
>> 100% CPU.  The idprio process never gets a chance to run again, and if
>> that vnode happened to be an important one (say for /), you may not be
>> able to kill the other process without rebooting.
> 
> You meant that when you use priorities, you risk priority inversion?
> 
> 8-p
> 
> -- Terry
> 

Well, I think the upshot is that if you use priorities that can result in a
process never getting any cycles you risk priority inversion.  If you use
normal "nice" priorities rather than those in the idprio range, then (I
assume...) this priority inversion can't happen, because the nice'd process
will eventually get some cycles.

I think this amounts to "a good policy reason why idprio is a root-only
command"... there is a potential "You'd better know what you're doing or the
system locks up" factor involved.

On the practical side of things, I'll continue to manually set my seti@home
process to idprio 30, because it makes a noticible difference in buildworld
performance.  (Not dramatic, but noticible.)

-- Ian


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?B8C6277B.B79E%freebsd>