From owner-freebsd-current@FreeBSD.ORG Fri Jul 15 01:13:57 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D11B616A41C; Fri, 15 Jul 2005 01:13:57 +0000 (GMT) (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 8DD8E43D45; Fri, 15 Jul 2005 01:13:57 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j6F1Dv52058459; Thu, 14 Jul 2005 18:13:57 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j6F1Dul5058458; Thu, 14 Jul 2005 18:13:57 -0700 (PDT) (envelope-from rizzo) Date: Thu, 14 Jul 2005 18:13:56 -0700 From: Luigi Rizzo To: Scott Long Message-ID: <20050714181356.A58300@xorpc.icir.org> References: <20050705053114.A96381@xorpc.icir.org> <35386.1120575587@phk.freebsd.dk> <20050705103353.A8185@xorpc.icir.org> <20050708110742.A6284@xorpc.icir.org> <20050708203537.H34251@fledge.watson.org> <20050708155827.A10658@xorpc.icir.org> <42D419C2.6040606@samsco.org> <20050712160935.A58434@xorpc.icir.org> <20050714155616.A56618@xorpc.icir.org> <42D7075F.5070907@samsco.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: <42D7075F.5070907@samsco.org>; from scottl@samsco.org on Thu, Jul 14, 2005 at 06:46:23PM -0600 Cc: s223560@studenti.ing.unipi.it, Robert Watson , current@freebsd.org Subject: Re: location of bioq lock 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, 15 Jul 2005 01:13:57 -0000 On Thu, Jul 14, 2005 at 06:46:23PM -0600, Scott Long wrote: ... > How often are you going to be changing the scheduler at runtime? Is in general, almost never. However, suppose you have per-device schedulers as phk was suggesting, then you'd really like to decouple the devices so reconfiguring one of them does not affect the others. Anyways there might be a way out... requests go from dev_strategy() to the individual disksort routine where, during the switch, the scheduler can 'absorb' them while the real queue drains (assuming the subsequent device_start() routine does not complain too much for finding the queue empty!). Then, when the device queue becomes empty (the scheduler knows because it is serving the bio_remove() requests) it can switch to the new one, and resubmit old requests through dev_strategy(). This would also solve the problem of implementing non-work-conserving schedulers. Basically it's the same approach followed in dummynet, you steal the packets from ip_{input,output}() and resubmit them later. Does any of you know what are the assumptions (locks held etc.) for calling dev_strategy() in 5.x and above ? cheers luigi > the scheduler meant to be aware of individual devices? Again, I'm > not advocating that the upper layers be able to look at or manipulate > the driver bioq's. > > Scott > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"