diff options
author | Vinod Koul <vinod.koul@intel.com> | 2013-11-16 01:24:17 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-11-16 01:32:36 -0500 |
commit | df12a3178d340319b1955be6b973a4eb84aff754 (patch) | |
tree | 2b9c68f8a6c299d1e5a4026c60117b5c00d46008 /Documentation | |
parent | 2f986ec6fa57a5dcf77f19f5f0d44b1f680a100f (diff) | |
parent | 82a1402eaee5dab1f3ab2d5aa4c316451374c5af (diff) |
Merge commit 'dmaengine-3.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine
Pull dmaengine changes from Dan
1/ Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.
2/ In the course of testing 1/ a collection of enhancements to dmatest
fell out. Notably basic performance statistics, and fixed / enhanced
test control through new module parameters 'run', 'wait', 'noverify',
and 'verbose'. Thanks to Andriy and Linus for their review.
3/ Testing the raid related corner cases of 1/ triggered bugs in the
recently added 16-source operation support in the ioatdma driver.
4/ Some minor fixes / cleanups to mv_xor and ioatdma.
Conflicts:
drivers/dma/dmatest.c
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/dmatest.txt | 72 |
1 files changed, 41 insertions, 31 deletions
diff --git a/Documentation/dmatest.txt b/Documentation/dmatest.txt index a2b5663eae26..dd77a81bdb80 100644 --- a/Documentation/dmatest.txt +++ b/Documentation/dmatest.txt | |||
@@ -15,39 +15,48 @@ be built as module or inside kernel. Let's consider those cases. | |||
15 | 15 | ||
16 | Part 2 - When dmatest is built as a module... | 16 | Part 2 - When dmatest is built as a module... |
17 | 17 | ||
18 | After mounting debugfs and loading the module, the /sys/kernel/debug/dmatest | ||
19 | folder with nodes will be created. There are two important files located. First | ||
20 | is the 'run' node that controls run and stop phases of the test, and the second | ||
21 | one, 'results', is used to get the test case results. | ||
22 | |||
23 | Note that in this case test will not run on load automatically. | ||
24 | |||
25 | Example of usage: | 18 | Example of usage: |
19 | % modprobe dmatest channel=dma0chan0 timeout=2000 iterations=1 run=1 | ||
20 | |||
21 | ...or: | ||
22 | % modprobe dmatest | ||
26 | % echo dma0chan0 > /sys/module/dmatest/parameters/channel | 23 | % echo dma0chan0 > /sys/module/dmatest/parameters/channel |
27 | % echo 2000 > /sys/module/dmatest/parameters/timeout | 24 | % echo 2000 > /sys/module/dmatest/parameters/timeout |
28 | % echo 1 > /sys/module/dmatest/parameters/iterations | 25 | % echo 1 > /sys/module/dmatest/parameters/iterations |
29 | % echo 1 > /sys/kernel/debug/dmatest/run | 26 | % echo 1 > /sys/module/dmatest/parameters/run |
27 | |||
28 | ...or on the kernel command line: | ||
29 | |||
30 | dmatest.channel=dma0chan0 dmatest.timeout=2000 dmatest.iterations=1 dmatest.run=1 | ||
30 | 31 | ||
31 | Hint: available channel list could be extracted by running the following | 32 | Hint: available channel list could be extracted by running the following |
32 | command: | 33 | command: |
33 | % ls -1 /sys/class/dma/ | 34 | % ls -1 /sys/class/dma/ |
34 | 35 | ||
35 | After a while you will start to get messages about current status or error like | 36 | Once started a message like "dmatest: Started 1 threads using dma0chan0" is |
36 | in the original code. | 37 | emitted. After that only test failure messages are reported until the test |
38 | stops. | ||
37 | 39 | ||
38 | Note that running a new test will not stop any in progress test. | 40 | Note that running a new test will not stop any in progress test. |
39 | 41 | ||
40 | The following command should return actual state of the test. | 42 | The following command returns the state of the test. |
41 | % cat /sys/kernel/debug/dmatest/run | 43 | % cat /sys/module/dmatest/parameters/run |
42 | 44 | ||
43 | To wait for test done the user may perform a busy loop that checks the state. | 45 | To wait for test completion userpace can poll 'run' until it is false, or use |
44 | 46 | the wait parameter. Specifying 'wait=1' when loading the module causes module | |
45 | % while [ $(cat /sys/kernel/debug/dmatest/run) = "Y" ] | 47 | initialization to pause until a test run has completed, while reading |
46 | > do | 48 | /sys/module/dmatest/parameters/wait waits for any running test to complete |
47 | > echo -n "." | 49 | before returning. For example, the following scripts wait for 42 tests |
48 | > sleep 1 | 50 | to complete before exiting. Note that if 'iterations' is set to 'infinite' then |
49 | > done | 51 | waiting is disabled. |
50 | > echo | 52 | |
53 | Example: | ||
54 | % modprobe dmatest run=1 iterations=42 wait=1 | ||
55 | % modprobe -r dmatest | ||
56 | ...or: | ||
57 | % modprobe dmatest run=1 iterations=42 | ||
58 | % cat /sys/module/dmatest/parameters/wait | ||
59 | % modprobe -r dmatest | ||
51 | 60 | ||
52 | Part 3 - When built-in in the kernel... | 61 | Part 3 - When built-in in the kernel... |
53 | 62 | ||
@@ -62,21 +71,22 @@ case. You always could check them at run-time by running | |||
62 | 71 | ||
63 | Part 4 - Gathering the test results | 72 | Part 4 - Gathering the test results |
64 | 73 | ||
65 | The module provides a storage for the test results in the memory. The gathered | 74 | Test results are printed to the kernel log buffer with the format: |
66 | data could be used after test is done. | ||
67 | 75 | ||
68 | The special file 'results' in the debugfs represents gathered data of the in | 76 | "dmatest: result <channel>: <test id>: '<error msg>' with src_off=<val> dst_off=<val> len=<val> (<err code>)" |
69 | progress test. The messages collected are printed to the kernel log as well. | ||
70 | 77 | ||
71 | Example of output: | 78 | Example of output: |
72 | % cat /sys/kernel/debug/dmatest/results | 79 | % dmesg | tail -n 1 |
73 | dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0) | 80 | dmatest: result dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0) |
74 | 81 | ||
75 | The message format is unified across the different types of errors. A number in | 82 | The message format is unified across the different types of errors. A number in |
76 | the parens represents additional information, e.g. error code, error counter, | 83 | the parens represents additional information, e.g. error code, error counter, |
77 | or status. | 84 | or status. A test thread also emits a summary line at completion listing the |
85 | number of tests executed, number that failed, and a result code. | ||
78 | 86 | ||
79 | Comparison between buffers is stored to the dedicated structure. | 87 | Example: |
88 | % dmesg | tail -n 1 | ||
89 | dmatest: dma0chan0-copy0: summary 1 test, 0 failures 1000 iops 100000 KB/s (0) | ||
80 | 90 | ||
81 | Note that the verify result is now accessible only via file 'results' in the | 91 | The details of a data miscompare error are also emitted, but do not follow the |
82 | debugfs. | 92 | above format. |