From owner-freebsd-current@FreeBSD.ORG Fri Jul 15 10:59:24 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 E563D16A422; Fri, 15 Jul 2005 10:59:24 +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 8EE7443D53; Fri, 15 Jul 2005 10:59:24 +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 j6FAxNXj066844; Fri, 15 Jul 2005 03:59:23 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j6FAxNRF066843; Fri, 15 Jul 2005 03:59:23 -0700 (PDT) (envelope-from rizzo) Date: Fri, 15 Jul 2005 03:59:23 -0700 From: Luigi Rizzo To: Poul-Henning Kamp Message-ID: <20050715035923.B66753@xorpc.icir.org> References: <20050714181356.A58300@xorpc.icir.org> <8462.1121409797@phk.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <8462.1121409797@phk.freebsd.dk>; from phk@haven.freebsd.dk on Fri, Jul 15, 2005 at 08:43:17AM +0200 Cc: Robert Watson , s223560@studenti.ing.unipi.it, 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 10:59:25 -0000 On Fri, Jul 15, 2005 at 08:43:17AM +0200, Poul-Henning Kamp wrote: > In message <20050714181356.A58300@xorpc.icir.org>, Luigi Rizzo writes: > > >Anyways there might be a way out... > >requests go from dev_strategy() > > The right place for this is geom_disk.c:g_disk_start() and the start > routines of the drivers which do not use geom_disk. g_disk_start() sonunds good, but i am not sure if other drivers export the start routine. It seems to be called more or less directly at the end of the strategy() routine of the individual driver, and it does not always likes to find the queue empty. But i am still learning on the layering of these things... cheers luigi > The easiest way to handle it would be to set a flag on the g_provider > saying "no more", have g_down spill the requests into a side queue > and when the driver is ready again, it calls some function which > pulls the request out of the side queue again. > > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence.