From owner-freebsd-current@FreeBSD.ORG Tue Oct 19 08:06:05 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 839301065670 for ; Tue, 19 Oct 2010 08:06:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 4873B8FC0C for ; Tue, 19 Oct 2010 08:06:04 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id E862E730A1; Tue, 19 Oct 2010 10:18:24 +0200 (CEST) Date: Tue, 19 Oct 2010 10:18:24 +0200 From: Luigi Rizzo To: David Naylor Message-ID: <20101019081824.GB54147@onelab2.iet.unipi.it> References: <201010180943.37042.naylor.b.david@gmail.com> <20101018195125.GA46115@onelab2.iet.unipi.it> <201010190807.59491.naylor.b.david@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010190807.59491.naylor.b.david@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: geom_sched usage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 08:06:05 -0000 On Tue, Oct 19, 2010 at 08:07:54AM +0200, David Naylor wrote: > On Monday 18 October 2010 21:51:25 Luigi Rizzo wrote: ... > > > - is there anyway to automatically attach gsched to a device on startup > > > (i.e. > > > > > > in rc.conf)? > > > > no, you have to build some script yourself. > > Would there be any interest in having a rc.d/ script? I would find it > conveniant to specify a single rc.conf line and get scheduling for all my > devices. PC-BSD might find such functionality useful. > > See attached for my first draft at such a script, I'm willing to hash it into > shape. it would surely be useful but try to keep it simple and user-driven (this is a general comment on rc.d scripts). Some things i think you should simplify in your script: - remove support for guessing which devices should get the scheduler. This is really a user decision and if the user names no devices then i believe it is better/safer not to install any scheduler. - use standard names such as gsched_flags or gsched_flags_${dev} to hold generic and specific flags for the insert command. It is neither useful nor flexible to have the script insert '-a' in front of the algorithm; cheers luigi