From owner-svn-src-projects@FreeBSD.ORG Tue Jan 25 23:29:52 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B77851065672; Tue, 25 Jan 2011 23:29:52 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 258BF8FC13; Tue, 25 Jan 2011 23:29:51 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 9BC1D45E5C; Wed, 26 Jan 2011 00:29:49 +0100 (CET) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 317F34569A; Wed, 26 Jan 2011 00:29:44 +0100 (CET) Date: Wed, 26 Jan 2011 00:29:32 +0100 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20110125232932.GD2004@garage.freebsd.pl> References: <201101251534.p0PFY7cF039182@svn.freebsd.org> <201101251117.49069.jhb@freebsd.org> <4D3EFB3F.8020508@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="veXX9dWIonWZEC6h" Content-Disposition: inline In-Reply-To: <4D3EFB3F.8020508@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r217828 - projects/graid/head/sys/geom/raid X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2011 23:29:52 -0000 --veXX9dWIonWZEC6h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 25, 2011 at 06:33:03PM +0200, Alexander Motin wrote: > On 25.01.2011 18:17, John Baldwin wrote: > >Hmm, so this allocates bio's to make the dump work. I believer other du= mp > >routines in other drivers do not do this, but instead use pre-allocated > >commands to schedule dump I/O requests. Would it be possible to=20 > >pre-allocate > >the bio that is used here when dumping is enabled and reuse it for each > >g_raid_dump() call without free'ing it when the I/O is finished? >=20 > Actually I've also thought about it. It is trivial to use static=20 > variable in this particular place. But transformation modules=20 > (RAID0/RAID1/...) are also allocating some BIOs via g_clone_bio() and=20 > there it can be more difficult to fix, as several BIOs are allocated=20 > same time to fulfill original request. I don't think you will ever need more BIOs than you have consumers. If so, then you could allocate bio per consumer at consumer creation time and keep it somewhere in g_consumer->private. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --veXX9dWIonWZEC6h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0/XNwACgkQForvXbEpPzRZ3gCg8VCndS192Ffzg0/6MaBKo4/t LT4AoKFdSkT5tlxtuYtqPbH/6xVU948V =MUW1 -----END PGP SIGNATURE----- --veXX9dWIonWZEC6h--