From owner-freebsd-geom@FreeBSD.ORG Fri Dec 10 15:59:15 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41EEC1065673 for ; Fri, 10 Dec 2010 15:59:15 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 056848FC13 for ; Fri, 10 Dec 2010 15:59:14 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id C4F723F62C; Fri, 10 Dec 2010 15:40:09 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id oBAFe9d3056018; Fri, 10 Dec 2010 15:40:09 GMT (envelope-from phk@critter.freebsd.dk) To: Lev Serebryakov From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 10 Dec 2010 18:33:22 +0300." <1136849868.20101210183322@serebryakov.spb.ru> Date: Fri, 10 Dec 2010 15:40:09 +0000 Message-ID: <56017.1291995609@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-geom@freebsd.org Subject: Re: One more question: is here any way to know is consumer busy or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2010 15:59:15 -0000 In message <1136849868.20101210183322@serebryakov.spb.ru>, Lev Serebryakov writ es: >Hello, Freebsd-geom. > > The same idea about pre-reading in case of providers with multiple > consumers (BTW, I think that terminology here is swapped): The provider offers access to a disk(-like) device, which the consumer can use. > looks good to issue pre-read only if target consumer is idle. Is > here any way to determine that? you can look at the nstart and nend elements of the g_consumer structure to tell how many outstanding requests there are on that consumer. -- 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.