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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 dump > >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 > >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? > > Actually I've also thought about it. It is trivial to use static > variable in this particular place. But transformation modules > (RAID0/RAID1/...) are also allocating some BIOs via g_clone_bio() and > there it can be more difficult to fix, as several BIOs are allocated > 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. -- Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0/XNwACgkQForvXbEpPzRZ3gCg8VCndS192Ffzg0/6MaBKo4/t LT4AoKFdSkT5tlxtuYtqPbH/6xVU948V =MUW1 -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110125232932.GD2004>
