Hi yipingwang,
Thank you for your response.
1. The code you provided has already been applied.
2. The changes were implemented in the kernel code, and I confirmed that the logs are being output.
Due to the log output, there is a delay, and the CASE2 TEST passed.
It seems that the memory allocation speed is faster than the deallocation speed, leading to memory allocation failures.
You may need to either increase the allocated memory or speed up the deallocation process, but I am unable to find a solution at the moment.
static void fsl_edma_free_desc(struct virt_dma_desc *vdesc)
{
struct fsl_edma_desc *fsl_desc;
int i;
fsl_desc = to_fsl_edma_desc(vdesc);
pr_info("%s]%d, n_tcds=%d\n", __func__,__LINE__,fsl_desc->n_tcds);
for (i = 0; i < fsl_desc->n_tcds; i++)
dma_pool_free(fsl_desc->echan->tcd_pool, fsl_desc->tcd[i].vtcd,
fsl_desc->tcd[i].ptcd);
kfree(fsl_desc);
}
...
[ 114.743300] fsl_edma_free_desc]295, n_tcds=1
[ 114.747579] fsl_edma_free_desc]295, n_tcds=1
[ 114.751858] fsl_edma_free_desc]295, n_tcds=1
[ 114.756163] fsl_edma_free_desc]295, n_tcds=1
[ 114.760446] fsl_edma_free_desc]295, n_tcds=1
[ 114.764726] fsl_edma_free_desc]295, n_tcds=1
...
I'd appreciate it if you could review the code, and please also check CASE 3 and CASE 4.
Thanks,
gyosun.