Date: Thu, 6 Jan 2011 15:37:15 -0800 From: Garrett Cooper <yanegomi@gmail.com> To: Alexander Best <arundel@freebsd.org> Cc: src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, svn-src-all@freebsd.org, Garrett Cooper <gcooper@freebsd.org>, svn-src-head@freebsd.org, Konstantin Belousov <kib@freebsd.org>, Anonymous <swell.k@gmail.com> Subject: Re: svn commit: r216955 - head/usr.sbin/rtprio Message-ID: <3AFB20EC-3BEF-4C52-B51F-94F0A9338CBB@gmail.com> In-Reply-To: <20110106224139.GA62043@freebsd.org> References: <201101041413.p04EDA4f038360@svn.freebsd.org> <AANLkTimDTq-JXF4gm9KUfo5eJaEXKaRF-CYiycFwdZML@mail.gmail.com> <20110106211017.GA46874@freebsd.org> <201101061618.39695.jhb@freebsd.org> <20110106214243.GA51802__16340.9905079336$1294350178$gmane$org@freebsd.org> <86bp3the8p.fsf@gmail.com> <20110106224139.GA62043@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 6, 2011, at 2:41 PM, Alexander Best wrote: > On Fri Jan 7 11, Anonymous wrote: >> Alexander Best <arundel@freebsd.org> writes: >>=20 >>> On Thu Jan 6 11, John Baldwin wrote: >>>> Note that that usage is rather pointless since it means you apply = rtprio to=20 >>>> the 'rtprio' process that is about to exit. :) >>>=20 >>> 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. ;) >>=20 >> I think it'd be useful if the syntax allowed smth like >>=20 >> $ rtprio 1 -0 -111 -222 -333 -444 -555 ... >=20 > 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=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AFB20EC-3BEF-4C52-B51F-94F0A9338CBB>