From owner-freebsd-current@FreeBSD.ORG Fri Jan 5 18:46:57 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A379C16A412; Fri, 5 Jan 2007 18:46:57 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 2826213C441; Fri, 5 Jan 2007 18:46:57 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l05IYH2R091528; Fri, 5 Jan 2007 10:34:17 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l05IYHUM091527; Fri, 5 Jan 2007 10:34:17 -0800 (PST) (envelope-from rizzo) Date: Fri, 5 Jan 2007 10:34:17 -0800 From: Luigi Rizzo To: Robert Watson Message-ID: <20070105103417.B91349@xorpc.icir.org> References: <20070105015800.s3rqdzgm8k8owk4s@webmail.ntnu.no> <20070105140941.B98541@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20070105140941.B98541@fledge.watson.org>; from rwatson@freebsd.org on Fri, Jan 05, 2007 at 02:14:26PM +0000 Cc: freebsd-current@freebsd.org, lulf@stud.ntnu.no, freebsd-geom@freebsd.org Subject: Re: Pluggable Disk Schedulers in GEOM 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: Fri, 05 Jan 2007 18:46:57 -0000 On Fri, Jan 05, 2007 at 02:14:26PM +0000, Robert Watson wrote: > > On Fri, 5 Jan 2007, lulf@stud.ntnu.no wrote: > > > Anyway, I'd like to research a bit on this topic to just see how much it > > does matter with different I/O scheduling for different purposes. > > I think working on this is interesting, but the one caution I'd have is that > it's possibly to introduce serious priority inversions through any complex > scheduling scheme for I/O. In our VFS, I/O is frequently performed while > holding locks or things that act like locks -- for example, during a directory > lookup, while pulling an inode off the disk, etc. The I/O will be initiated > by one thread, but then other threads will end up waiting for it also. If > there is a naive mapping of initiating thread priority to I/O request > priority, then you can end up with high priority threads being blocked on a > low priority tasks, leading to nasty starvation effects, especially if the > scheduler allows indefinite waiting for I/O at a low priority. This, at a that's a problem with priority based schedulers. neither the elevator nor the proportional-fair scheduler in Hybrid, nor a plain FIFO scheduler soffer from this 'indefinite waiting' problem. If i remember well the elevator code in freebsd had some support for 'prioritized' requests that could go in front of the queue no matter what, but i think that part was not really used. cheers luigi