linux-stable/drivers/dma/sh
Kuninori Morimoto 3565fe5333 dmaengine: rcar-dmac: use list_add() on rcar_dmac_desc_put()
For each descriptor, in addition to the memory used by the descriptors
structure itself, the driver allocates a list of chunks as well as a
buffer for hardware descriptors. Descriptors themselves are preallocated,
and allocation of the chunks and buffer is performed the first time the
descriptor is used. The memory isn't freed when the transfer is completed,
as the chunks and buffer will be needed again when the descriptor is
reused internally, so the driver keeps the memory around.

If only a few descriptors are used concurrently, the current
list_add_tail() implementation will result in all preallocated descriptors
being used before going back to the first one, and will thus allocate
chunks and a buffer for all preallocated descriptors. Using list_add()
will put the complete descriptor at the head of the list of available
descriptors, so the next transfer will be more likely to reuse a
descriptor that already has associated memory instead of one that has
never been used before.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2016-05-30 09:12:00 +05:30
..
Kconfig dmaengine: sh: Use ARCH_RENESAS 2016-02-08 08:48:08 +05:30
Makefile dmaengine: sh: Remove unused R-Car HPB-DMAC driver 2015-12-10 09:43:33 +05:30
rcar-dmac.c dmaengine: rcar-dmac: use list_add() on rcar_dmac_desc_put() 2016-05-30 09:12:00 +05:30
shdma-arm.h dmaengine: shdma: Use defines instead of hardcoded numbers 2014-07-15 18:02:29 +09:00
shdma-base.c dmaengine: shdma: use normal interface for passing slave id 2015-02-23 16:12:24 +05:30
shdma-of.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
shdma-r8a73a4.c dmaengine: shdma: r8a73a4: Make dma_ts_shift[] static 2015-05-25 22:33:07 +05:30
shdma.h dmaengine: sh: Rework Kconfig and Makefile 2014-07-31 17:15:45 +05:30
shdmac.c dmaengine: sh: shdmac: don't open code of_device_get_match_data() 2016-03-03 21:32:45 +05:30
sudmac.c dmaengine: Remove .owner field for driver 2014-11-06 11:54:18 +05:30
usb-dmac.c dmaengine updates for 4.5-rc1 2016-01-13 10:59:52 -08:00