Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jan 2011 00:29:32 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>
Subject:   Re: svn commit: r217828 - projects/graid/head/sys/geom/raid
Message-ID:  <20110125232932.GD2004@garage.freebsd.pl>
In-Reply-To: <4D3EFB3F.8020508@FreeBSD.org>
References:  <201101251534.p0PFY7cF039182@svn.freebsd.org> <201101251117.49069.jhb@freebsd.org> <4D3EFB3F.8020508@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110125232932.GD2004>