From owner-svn-src-head@FreeBSD.ORG Thu Jan 6 23:58:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 758421065670; Thu, 6 Jan 2011 23:58:29 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 136DD8FC0C; Thu, 6 Jan 2011 23:58:27 +0000 (UTC) Received: by wwf26 with SMTP id 26so16706976wwf.31 for ; Thu, 06 Jan 2011 15:58:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=YmKh3rAM3GCy69iogmJjG9LP5Q38dkl+glRnE6iDVqA=; b=piWsqW4nNKnvdOuXTNmb5SZKnZdAVfDWDdGhiebZA06aqBalUhMwenD78F4f3WNAt8 BfcE/mWt/ZpF6G0kibuNxDCkhoYjojXJSgHtjOu4dPVI3g4w52d00gTCZOOvYDP3qik4 1l3UKU2V4BF0AOl6NIR3OYFsmte4nVIfhSK/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=NkHUZTGNO7OCFffhjkMG5vekPQ9fhR+CLEms52HEyHZuDau+8528Baf03WYIdvMOXI Sua4DRxZulWrYN4kbhaQGh0CdiVBekVSI6UsEMvtgmJTy/vbDie6yBKMziyhUWnZLheU YFOdVzmpUwkEQmXkY9rViQsEP2M8V5jdpp/dI= Received: by 10.216.51.67 with SMTP id a45mr1016738wec.19.1294358307168; Thu, 06 Jan 2011 15:58:27 -0800 (PST) Received: from localhost ([81.218.219.122]) by mx.google.com with ESMTPS id r38sm12118545weq.47.2011.01.06.15.58.23 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Jan 2011 15:58:26 -0800 (PST) From: Anonymous To: Garrett Cooper References: <201101041413.p04EDA4f038360@svn.freebsd.org> <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> <3AFB20EC-3BEF-4C52-B51F-94F0A9338CBB@gmail.com> Date: Fri, 07 Jan 2011 02:58:13 +0300 In-Reply-To: <3AFB20EC-3BEF-4C52-B51F-94F0A9338CBB@gmail.com> (Garrett Cooper's message of "Thu, 6 Jan 2011 15:37:15 -0800") Message-ID: <86y66xd1pm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Garrett Cooper , Konstantin Belousov , svn-src-head@freebsd.org, Alexander Best Subject: Re: svn commit: r216955 - head/usr.sbin/rtprio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2011 23:58:29 -0000 Garrett Cooper writes: > On Jan 6, 2011, at 2:41 PM, Alexander Best wrote: > >> On Fri Jan 7 11, Anonymous wrote: >>> Alexander Best 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 I was thinking about rtprio(1) raising its own priority using syntax like $ rtprio num -0 ... or $ rtprio -t -0 ... so that subsequent calls to rtprio(2) are under new priority. Not sure if it makes difference on heavily loaded system. > -- but how often do you execute > rtprio, and is the required code change really necessary? Simple is > better in my book.