[PATCH v3 7/9] fsldma: support async_tx dependencies and automatic unmapping

Dan Williams dan.j.williams at intel.com
Fri Mar 4 07:51:14 EST 2011


On Thu, Mar 3, 2011 at 9:54 AM, Ira W. Snyder <iws at ovro.caltech.edu> wrote:
> Previous to this patch, the dma_run_dependencies() function has been
> called while holding desc_lock. This function can call tx_submit() for
> other descriptors, which may try to re-grab the lock. Avoid this by
> moving the descriptors to be cleaned up to a temporary list, and
> dropping the lock before cleanup.
>
> At the same time, add support for automatic unmapping of src and dst
> buffers, as offered by the DMAEngine API.

Unfortunately, this may be a short lived addition as Russell has put
the the kibosh on how the dmaengine api supports dependencies and
automated unmapping [1].  It really needs to be up to the client to
maintain all the mappings until the dma operation is complete.  If we
cross dma mapping domains we need to queisce operations, remap the
buffers and submit the dma to the next channel.  The current approach
of using overlapping mappings is broken on at least ARM v6+ platforms.

So I need to rework how md raid submits dependencies and manages the
dma mapping api, and will most likely end up removing dependency
support from the api as I do not see a clean way for this to be
automated behind the client's back.  Mapping needs to be sole
responsibility of the client.

Other than that this patch looks good.

--
Dan

[1] http://marc.info/?l=linux-raid&m=129407256602759&w=2


More information about the Linuxppc-dev mailing list