Re: [PATCH] dmaengine: free descriptor when free chan resource

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/10/2015 12:51 PM, Jun Nie wrote:
Free descriptor when free chan resource as some device,
such as soc soc-generic-dmaengine-pcm.c in audio side,
may not release channel. This cause too much memory is
cached for descriptor is not released.

[...]
@@ -98,13 +98,10 @@ void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head)
  	while (!list_empty(head)) {
  		struct virt_dma_desc *vd = list_first_entry(head,
  			struct virt_dma_desc, node);
-		if (async_tx_test_ack(&vd->tx)) {
-			list_move_tail(&vd->node, &vc->desc_allocated);
-		} else {
-			dev_dbg(vc->chan.device->dev, "txd %p: freeing\n", vd);
-			list_del(&vd->node);
-			vc->desc_free(vd);
-		}
+		list_move_tail(&vd->node, &vc->desc_allocated);
+		dev_dbg(vc->chan.device->dev, "txd %p: freeing\n", vd);
+		list_del(&vd->node);
+		vc->desc_free(vd);

This is basically a revert of b9855f03d560 ("dmaengine: virt-dma: don't always free descriptor upon completion"). Which was just introduced, so this is probably not what you want.

Furthermore audio DMA uses cyclic DMA, so it doesn't even hit this code path, so the patch description doesn't really add up to the changes.

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux