svn commit: r217828 - projects/graid/head/sys/geom/raid
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue Jan 25 23:29:52 UTC 2011
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 at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20110125/4859ef34/attachment.pgp
More information about the svn-src-projects
mailing list