summaryrefslogtreecommitdiffstats
path: root/drivers/dma/xgene-dma.c
diff options
context:
space:
mode:
authorJean-Nicolas Graux <jean-nicolas.graux@st.com>2019-03-04 16:03:58 +0100
committerVinod Koul <vkoul@kernel.org>2019-03-25 21:52:28 +0530
commit2ff25c1c3279b09b7f4ad1a06be5dc3b55d29027 (patch)
tree92d091579dcc1ad426c14cd9fec0b7238b60c737 /drivers/dma/xgene-dma.c
parent921234e0c5d77b510ccc22d9fcfa844f20de970a (diff)
downloadlinux-2ff25c1c3279b09b7f4ad1a06be5dc3b55d29027.tar.bz2
dmaengine: pl08x: be fair when re-assigning physical channel
Current way we find a waiting virtual channel for the next transfer at the time one physical channel becomes free is not really fair. More in details, in case there is more than one channel waiting at a time, by just going through the arrays of memcpy and slave channels and stopping as soon as state match waiting state, channels with high indexes can be penalized. Whenever dma engine is substantially overloaded so that we constantly get several channels waiting, channels with highest indexes might not be served for a substantial time which in the worse case, might hang task that wait for dma transfer to complete. This patch makes physical channel re-assignment more fair by storing time in jiffies when a channel is put in waiting state. Whenever a physical channel has to be re-assigned, this time is used to select channel that is waiting for the longest time. Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Nicolas Guion <nicolas.guion@st.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/xgene-dma.c')
0 files changed, 0 insertions, 0 deletions