svn commit: r216955 - head/usr.sbin/rtprio

Garrett Cooper yanegomi at gmail.com
Thu Jan 6 23:37:21 UTC 2011


On Jan 6, 2011, at 2:41 PM, Alexander Best wrote:

> On Fri Jan  7 11, Anonymous wrote:
>> Alexander Best <arundel at freebsd.org> writes:
>> 
>>> On Thu Jan  6 11, John Baldwin wrote:
>>>> Note that that usage is rather pointless since it means you apply rtprio to 
>>>> the 'rtprio' process that is about to exit. :)
>>> 
>>> yeah but at least it makes the usage of -X consistent. ;) also consider the
>>> following: the current shell has idle priority and you want to run rtprio in
>>> normal priority. then rtprio -t -0 would be a neat way of doing
>>> rtprio -t rtprio. ;) wel...not quite, because the priotity gets set to "NORMAL"
>>> when rtprio is almost finished running. ;)
>> 
>> I think it'd be useful if the syntax allowed smth like
>> 
>>  $ rtprio 1 -0 -111 -222 -333 -444 -555 ...
> 
> defenately, but that would require quite some code. also please bear in mind:
> in its current form rtprio *DOES* process -0. my code doesn't change that. the
> only thing that it changes is that before hand -0 was processed *AND* then also
> executed. now the execution doesn't take place.

	Same thing, no code change:

sh -c 'for i in 1 -0 -111 -222 -333 -444 -555; do rtprio $i; done'

	Yes, there's more of a processing cost to doing it this way with exec/fork jazz and shell logic -- but how often do you execute rtprio, and is the required code change really necessary? Simple is better in my book.
Thanks,
-Garrett


More information about the svn-src-head mailing list