Re: [PATCH V2 5/5] dmaengine: Documentation: Add documentation for multi chan testing

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

 



Hi,

On 2018-08-31 18:01, Seraj Mohammed wrote:
>> However, if I got it right I need to reboot the machine if I want to
>> change any of the parameters for a re-run.
>> Let's say I want to run tests on 6 channel with 50K buffers, 100K 1M, 10M.
>> I can not do this without rebooting, right?
> 
> You only need to reboot the machine if you want to change paameters after
> allocating the channels.

Instead of reboot running the test is fine to clear things up.

> Example:
> 
> echo 4096 > /sys/module/dmatest/parameters/test_buf_size
> echo 1 > /sys/module/dmatest/parameters/iterations
> echo 6 > /sys/module/dmatest/parameters/alignment
> echo 0 > /sys/module/dmatest/parameters/noverify
> echo 0 > /sys/module/dmatest/parameters/norandom
> echo 1 > /sys/module/dmatest/parameters/threads_per_chan
> echo 20000 > /sys/module/dmatest/parameters/timeout
> 
> At the is point, you can still change any of the parameters above without
> rebooting

But I can not do:
echo 8000000 > /sys/module/dmatest/parameters/test_buf_size
echo 2000 > /sys/module/dmatest/parameters/timeout
echo 20 > /sys/module/dmatest/parameters/iterations
echo 20 > /sys/module/dmatest/parameters/max_channels
echo 1 > /sys/module/dmatest/parameters/run

it will _not_ start 20 iteration tests on 20 channels.

> 
> echo dma0chan0 > /sys/module/dmatest/parameters/channel
> [   31.465240] dmatest: Added 1 threads using dma0chan0
> echo dma0chan1 > /sys/module/dmatest/parameters/channel
> [   33.142020] dmatest: Added 1 threads using dma0chan1
> echo dma0chan2 > /sys/module/dmatest/parameters/channel
> [   34.402123] dmatest: Added 1 threads using dma0chan2

I need to:
echo dma0chan10 > /sys/module/dmatest/parameters/channel
cat /sys/module/dmatest/parameters/channel
dma0chan10

echo dma0chan11 > /sys/module/dmatest/parameters/channel
cat /sys/module/dmatest/parameters/channel
dma0chan11

^ it tells me that only dma0chan11 is in channels while in fact I have
dma0chan10 and dma0chan11 selected.

then I run the test:
echo 1 > /sys/module/dmatest/parameters/run
[  514.370959] dmatest: dma0chan10-copy: summary 1 tests, 0 failures
7692 iops 15384 KB/s (0)
[  514.371099] dmatest: dma0chan11-copy: summary 1 tests, 0 failures
11111 iops 22222 KB/s (0)

After this:
cat /sys/module/dmatest/parameters/channel returns nothing, which I
believe is correct. So I could be able to run the 20 iteration on 20
channels, but I can not:
echo 20 > /sys/module/dmatest/parameters/iterations
echo 20 > /sys/module/dmatest/parameters/max_channels
echo 1 > /sys/module/dmatest/parameters/run

The patch effectively breaks the batch mode via max_channels.

> As you can see now channels 0,1, 2 have already been allocated and their
> respective threads are pending. At this point if you want to change
> any parameters you have to reboot, because the channels have already been
> requested with the properties set above.
> 
> echo 1 > /sys/module/dmatest/parameters/run
> dmatest: dma0chan0-copy0: summary 1 tests, 0 failures 285.71 iops 571
> KB/s (0)
> dmatest: dma0chan2-copy0: summary 1 tests, 0 failures 142.85 iops 285
> KB/s (0)
> dmatest: dma0chan1-copy0: summary 1 tests, 0 failures 142.85 iops 428
> KB/s (0)
> 
> At this point the test is finished and you can run a new test with
> completely different parameters without having to reboot.

That's fine.

If I want to just repeat the same test then I would put the same
channels back in a loop and run it again to run them overnight for example.

But it is still unclear how the channels will be released..
cat /sys/class/dma/dma0chan10/in_use
0
echo dma0chan10 > /sys/module/dmatest/parameters/channel
cat /sys/class/dma/dma0chan10/in_use
1
echo 1 > /sys/module/dmatest/parameters/run
[  690.326039] dmatest: dma0chan10-copy: summary 20 tests, 0 failures 71
iops 290511 KB/s (0)
cat /sys/class/dma/dma0chan10/in_use
1
echo 1 > /sys/module/dmatest/parameters/run
# will not run any tests
cat /sys/class/dma/dma0chan10/in_use
1

echo dma0chan12 > /sys/module/dmatest/parameters/channel
cat /sys/class/dma/dma0chan10/in_use
0
cat /sys/class/dma/dma0chan12/in_use
1


So it appears that the channel is going to be released when a new
channel is added, right?

Which brought up some interesting thing:
echo "" > /sys/module/dmatest/parameters/channel

Will add the 20 channels to the test :o

One thing would be really nice is to print something when we hit run and
the dmatest actually going to do something or if the dmatest is not
configured properly and will not going to run any test.


> 
>> Would not be possible to:
>>
>> echo "dma0chan0 dma0chan3 dma0chan5 dma0chan6" >
>> /sys/module/dmatest/parameters/channel
>>
>> and use the same logic already existing for max_channels to start off
>> the tests on different channels?
> 
> It is possible, but i wouldn't make it possible to start all threads at
> once, which is what i want to do. If i do it this way, the test would have
> have extract the channels one by one and allocate and start them
> sequentially. My patch ensures that when I set run to 1, all channels fire
> off at the same time, or as close as possible without having the overhead
> of allocating channels inbetween transfers.
> 
>>> You can still run your torture test with a simple modification:
>>>
>>> echo 8000000 > /sys/module/dmatest/parameters/test_buf_size
>>> echo 2000 > /sys/module/dmatest/parameters/timeout
>>> echo 20 > /sys/module/dmatest/parameters/iterations
>>> echo 20 > /sys/module/dmatest/parameters/max_channels
>>> echo "" > /sys/module/dmatest/parameters/channel << allocates 20 channels
>>> echo 1 > /sys/module/dmatest/parameters/run
>>
>> Sure, but if I test something on a specific channels I need to reboot.
>> Or if I want to change parameters for a next run...
>>
>>>
>>>>> +    % echo 1 > /sys/module/dmatest/parameters/run
>>>>>  
>>>>> +Note: the channel parameter should always be the last parameter set prior to
>>>>> +running the test (setting run=1), this is because upon setting the channel
>>>>> +parameter, that specific channel is requested using the dmaengine and a thread
>>>>> +is created with the existing parameters. This thread is set as pending
>>>>> +and will be executed once run is set to 1. Any parameters set after the thread
>>>>> +is created are not applied.
>>>>>  .. hint::
>>>>>    available channel list could be extracted by running the following command::
>>>>>  
>>>>>      % ls -1 /sys/class/dma/
>>>>>  
>>>>> -Once started a message like "dmatest: Started 1 threads using dma0chan0" is
>>>>> -emitted. After that only test failure messages are reported until the test
>>>>> -stops.
>>>>> +Once started a message like " dmatest: Added 1 threads using dma0chan0" is
>>>>> +emitted. A thread for that specific channel is created and is now pending, the
>>>>> +pending thread is started once run is to 1.
>>>>>  
>>>>>  Note that running a new test will not stop any in progress test.
>>>>>  
>>>>>
>>>>
>>>> - Péter
>>>>
>>>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
>>>> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>>>>
>>>
>>> - Seraj
>>>
>>
>> - Péter
>>
>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
>> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>>

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



[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