Thread (16 messages) 16 messages, 4 authors, 2008-12-11

Re: [PATCH 1/4 v2] dmaengine: add a tx_free method to struct dma_async_tx_descriptor

From: Guennadi Liakhovetski <hidden>
Date: 2008-12-11 00:30:46
Also in: lkml

Hi Dan,

On Wed, 10 Dec 2008, Dan Williams wrote:
On Wed, Dec 10, 2008 at 3:36 AM, Guennadi Liakhovetski
[off-list ref] wrote:
quoted
From: Guennadi Liakhovetski <redacted>

Some users reuse DMA transaction descriptors multiple times and need an
explicit call to release them. An example of such a user is Video4Linux, which
has to be able to release descriptors on ioctl(VIDIOC_DQBUF).

Signed-off-by: Guennadi Liakhovetski <redacted>

Hi Guennadi,

Other dmaengine drivers have tasklets that scan the list of completed
descriptors and free the "acked" ones.  This happens in the cleanup
tasklet...
/me looks
...hmm this driver does not have a cleanup routine?  Ideally support
for ioctl(VIDIOC_DQBUF) could be achieved through this mechanism
without needing to increase the size of dma_async_tx_descriptor (which
has cache utilization impacts on other drivers).
You mean there are drivers, that have struct dma_async_tx_descriptor on 
stack? Can you give me an example? And you mean, that increasing the size 
of the struct by one pointer and letting users explicitly free those 
descriptors when they want is worse than introducing a tasklet that will 
have to periodically scan the list of descriptors while other hot paths 
will move elements to and from this list, look for acked elements, lock 
the list and free those elements? Periodically, because although we have 
an event when to free them - on ioctl - there is no API to trigger that 
tasklet. Or am I missing something? I can do this, it just sounds strange 
to me.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help