* [PATCH] dmaengine: dmatest: stop completed threads when running without set channel
@ 2020-07-01 10:12 Peter Ujfalusi
2020-07-02 8:41 ` Vladimir Murzin
2020-07-06 5:13 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2020-07-01 10:12 UTC (permalink / raw)
To: vkoul; +Cc: dmaengine, dan.j.williams, grygorii.strashko, vladimir.murzin
The completed threads were not cleared and consequent run would result
threads accumulating:
echo 800000 > /sys/module/dmatest/parameters/test_buf_size
echo 2000 > /sys/module/dmatest/parameters/timeout
echo 50 > /sys/module/dmatest/parameters/iterations
echo 1 > /sys/module/dmatest/parameters/max_channels
echo "" > /sys/module/dmatest/parameters/channel
[ 237.507265] dmatest: Added 1 threads using dma1chan2
echo 1 > /sys/module/dmatest/parameters/run
[ 244.713360] dmatest: Started 1 threads using dma1chan2
[ 246.117680] dmatest: dma1chan2-copy0: summary 50 tests, 0 failures 2437.47 iops 977623 KB/s (0)
echo 1 > /sys/module/dmatest/parameters/run
[ 292.381471] dmatest: No channels configured, continue with any
[ 292.389307] dmatest: Added 1 threads using dma1chan3
[ 292.394302] dmatest: Started 1 threads using dma1chan2
[ 292.399454] dmatest: Started 1 threads using dma1chan3
[ 293.800835] dmatest: dma1chan3-copy0: summary 50 tests, 0 failures 2624.53 iops 975014 KB/s (0)
echo 1 > /sys/module/dmatest/parameters/run
[ 307.301429] dmatest: No channels configured, continue with any
[ 307.309212] dmatest: Added 1 threads using dma1chan4
[ 307.314197] dmatest: Started 1 threads using dma1chan2
[ 307.319343] dmatest: Started 1 threads using dma1chan3
[ 307.324492] dmatest: Started 1 threads using dma1chan4
[ 308.730773] dmatest: dma1chan4-copy0: summary 50 tests, 0 failures 2390.28 iops 965436 KB/s (0)
Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel")
Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/dma/dmatest.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 18f10154ba19..45d4d92e91db 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -1185,6 +1185,8 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp)
} else if (dmatest_run) {
if (!is_threaded_test_pending(info)) {
pr_info("No channels configured, continue with any\n");
+ if (!is_threaded_test_run(info))
+ stop_threaded_test(info);
add_threaded_test(info);
}
start_threaded_tests(info);
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: dmatest: stop completed threads when running without set channel
2020-07-01 10:12 [PATCH] dmaengine: dmatest: stop completed threads when running without set channel Peter Ujfalusi
@ 2020-07-02 8:41 ` Vladimir Murzin
2020-07-06 5:13 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Murzin @ 2020-07-02 8:41 UTC (permalink / raw)
To: Peter Ujfalusi, vkoul; +Cc: dmaengine, dan.j.williams, grygorii.strashko
On 7/1/20 11:12 AM, Peter Ujfalusi wrote:
> The completed threads were not cleared and consequent run would result
> threads accumulating:
>
> echo 800000 > /sys/module/dmatest/parameters/test_buf_size
> echo 2000 > /sys/module/dmatest/parameters/timeout
> echo 50 > /sys/module/dmatest/parameters/iterations
> echo 1 > /sys/module/dmatest/parameters/max_channels
> echo "" > /sys/module/dmatest/parameters/channel
> [ 237.507265] dmatest: Added 1 threads using dma1chan2
> echo 1 > /sys/module/dmatest/parameters/run
> [ 244.713360] dmatest: Started 1 threads using dma1chan2
> [ 246.117680] dmatest: dma1chan2-copy0: summary 50 tests, 0 failures 2437.47 iops 977623 KB/s (0)
>
> echo 1 > /sys/module/dmatest/parameters/run
> [ 292.381471] dmatest: No channels configured, continue with any
> [ 292.389307] dmatest: Added 1 threads using dma1chan3
> [ 292.394302] dmatest: Started 1 threads using dma1chan2
> [ 292.399454] dmatest: Started 1 threads using dma1chan3
> [ 293.800835] dmatest: dma1chan3-copy0: summary 50 tests, 0 failures 2624.53 iops 975014 KB/s (0)
>
> echo 1 > /sys/module/dmatest/parameters/run
> [ 307.301429] dmatest: No channels configured, continue with any
> [ 307.309212] dmatest: Added 1 threads using dma1chan4
> [ 307.314197] dmatest: Started 1 threads using dma1chan2
> [ 307.319343] dmatest: Started 1 threads using dma1chan3
> [ 307.324492] dmatest: Started 1 threads using dma1chan4
> [ 308.730773] dmatest: dma1chan4-copy0: summary 50 tests, 0 failures 2390.28 iops 965436 KB/s (0)
>
> Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel")
> Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/dma/dmatest.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
> index 18f10154ba19..45d4d92e91db 100644
> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -1185,6 +1185,8 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp)
> } else if (dmatest_run) {
> if (!is_threaded_test_pending(info)) {
> pr_info("No channels configured, continue with any\n");
> + if (!is_threaded_test_run(info))
> + stop_threaded_test(info);
> add_threaded_test(info);
> }
> start_threaded_tests(info);
>
I should admit I did not run dmatest back to back. Unfortunately, I do not have access to hardware to
give it a try nor I have enough confidence to review the change :( Sorry for the bug!
Cheers
Vladimir
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: dmatest: stop completed threads when running without set channel
2020-07-01 10:12 [PATCH] dmaengine: dmatest: stop completed threads when running without set channel Peter Ujfalusi
2020-07-02 8:41 ` Vladimir Murzin
@ 2020-07-06 5:13 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-07-06 5:13 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: dmaengine, dan.j.williams, grygorii.strashko, vladimir.murzin
On 01-07-20, 13:12, Peter Ujfalusi wrote:
> The completed threads were not cleared and consequent run would result
> threads accumulating:
>
> echo 800000 > /sys/module/dmatest/parameters/test_buf_size
> echo 2000 > /sys/module/dmatest/parameters/timeout
> echo 50 > /sys/module/dmatest/parameters/iterations
> echo 1 > /sys/module/dmatest/parameters/max_channels
> echo "" > /sys/module/dmatest/parameters/channel
> [ 237.507265] dmatest: Added 1 threads using dma1chan2
> echo 1 > /sys/module/dmatest/parameters/run
> [ 244.713360] dmatest: Started 1 threads using dma1chan2
> [ 246.117680] dmatest: dma1chan2-copy0: summary 50 tests, 0 failures 2437.47 iops 977623 KB/s (0)
>
> echo 1 > /sys/module/dmatest/parameters/run
> [ 292.381471] dmatest: No channels configured, continue with any
> [ 292.389307] dmatest: Added 1 threads using dma1chan3
> [ 292.394302] dmatest: Started 1 threads using dma1chan2
> [ 292.399454] dmatest: Started 1 threads using dma1chan3
> [ 293.800835] dmatest: dma1chan3-copy0: summary 50 tests, 0 failures 2624.53 iops 975014 KB/s (0)
>
> echo 1 > /sys/module/dmatest/parameters/run
> [ 307.301429] dmatest: No channels configured, continue with any
> [ 307.309212] dmatest: Added 1 threads using dma1chan4
> [ 307.314197] dmatest: Started 1 threads using dma1chan2
> [ 307.319343] dmatest: Started 1 threads using dma1chan3
> [ 307.324492] dmatest: Started 1 threads using dma1chan4
> [ 308.730773] dmatest: dma1chan4-copy0: summary 50 tests, 0 failures 2390.28 iops 965436 KB/s (0)
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-06 5:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 10:12 [PATCH] dmaengine: dmatest: stop completed threads when running without set channel Peter Ujfalusi
2020-07-02 8:41 ` Vladimir Murzin
2020-07-06 5:13 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).