Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2013 16:10:44 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r254408 - in projects/camlock/sys: cam/ata cam/scsi dev/md geom
Message-ID:  <520E24D4.2040606@FreeBSD.org>
In-Reply-To: <20130816130503.GC4972@kib.kiev.ua>
References:  <201308161225.r7GCP3EW061762@svn.freebsd.org> <20130816130503.GC4972@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16.08.2013 16:05, Konstantin Belousov wrote:
> On Fri, Aug 16, 2013 at 12:25:03PM +0000, Alexander Motin wrote:
>> Author: mav
>> Date: Fri Aug 16 12:25:02 2013
>> New Revision: 254408
>> URL: http://svnweb.freebsd.org/changeset/base/254408
>>
>> Log:
>>    Make first steps toward direct BIO dispatch in GEOM:
>>     - Define flags, declaring that specific consumer/provider is capable of
>>    sending requests/replies (respectively) directly, i,e. doesn't hold any locks
>>    and so reenterable, and/or able to directly receive replies/requests, i.e.
>>    doesn't depend on GEOM up/down threads semantics.  As result, GEOM will make
>>    direct calls only if both caller and callee are cpable of it in each case.
>>     - Define disk(9) flag to declare that disk is capable of direct request
>>    completion, and use it for da(4) and ada(4) drivers.  Make GEOM DISK to pass
>>    that flag to its provider and also assume that any disk is capable of
>>    receiveing requests directly.
>>     - Mark GEOM DEV as capable of both direct send and receive.
>>     - Make md(4) declare both direct send and receive after adding mutex to
>>    serialize its statistics update on request path.
>
> I do not think it is safe to allow the mdstart_malloc() to execute in
> parallel with itself.  It certainly causes data corruption for the new
> block allocations on write, and possibly random kernel memory corruption.
>
> It seems that vnode and swap backends are safe, though.

md(4) runs all of its main code in separate thread. So this change only 
affects how to pass requests from GEOM to that thread. I had no plans to 
work on md(4) specifically, so if somebody else wish to make it run 
without using single separate thread per instance -- that would boost 
its performance many times more.

-- 
Alexander Motin



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