* [PATCH V3] dmaengine: dmatest: exclude compare and fill time during perf report
@ 2016-09-01 14:02 Sinan Kaya
2016-09-02 11:07 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Sinan Kaya @ 2016-09-01 14:02 UTC (permalink / raw)
To: dmaengine, timur, cov
Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, linux-kernel
Dmatest is currently including compare and fill time into the
calculated performance numbers. This does not reflect the HW
capability and the results vary based on the CPU speed instead of
the HW speed.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/dma/dmatest.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 1245db5..738fbd1 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -426,7 +426,9 @@ static int dmatest_func(void *data)
int src_cnt;
int dst_cnt;
int i;
- ktime_t ktime;
+ ktime_t ktime, start, diff;
+ ktime_t filltime = ktime_set(0, 0);
+ ktime_t comparetime = ktime_set(0, 0);
s64 runtime = 0;
unsigned long long total_len = 0;
@@ -531,6 +533,7 @@ static int dmatest_func(void *data)
src_off = 0;
dst_off = 0;
} else {
+ start = ktime_get();
src_off = dmatest_random() % (params->buf_size - len + 1);
dst_off = dmatest_random() % (params->buf_size - len + 1);
@@ -541,6 +544,9 @@ static int dmatest_func(void *data)
params->buf_size);
dmatest_init_dsts(thread->dsts, dst_off, len,
params->buf_size);
+
+ diff = ktime_sub(ktime_get(), start);
+ filltime = ktime_add(filltime, diff);
}
um = dmaengine_get_unmap_data(dev->dev, src_cnt+dst_cnt,
@@ -683,6 +689,7 @@ static int dmatest_func(void *data)
continue;
}
+ start = ktime_get();
pr_debug("%s: verifying source buffer...\n", current->comm);
error_count = dmatest_verify(thread->srcs, 0, src_off,
0, PATTERN_SRC, true);
@@ -703,6 +710,9 @@ static int dmatest_func(void *data)
params->buf_size, dst_off + len,
PATTERN_DST, false);
+ diff = ktime_sub(ktime_get(), start);
+ comparetime = ktime_add(comparetime, diff);
+
if (error_count) {
result("data error", total_tests, src_off, dst_off,
len, error_count);
@@ -712,7 +722,10 @@ static int dmatest_func(void *data)
dst_off, len, 0);
}
}
- runtime = ktime_us_delta(ktime_get(), ktime);
+ ktime = ktime_sub(ktime_get(), ktime);
+ ktime = ktime_sub(ktime, comparetime);
+ ktime = ktime_sub(ktime, filltime);
+ runtime = ktime_to_us(ktime);
ret = 0;
err_dstbuf:
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V3] dmaengine: dmatest: exclude compare and fill time during perf report
2016-09-01 14:02 [PATCH V3] dmaengine: dmatest: exclude compare and fill time during perf report Sinan Kaya
@ 2016-09-02 11:07 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2016-09-02 11:07 UTC (permalink / raw)
To: Sinan Kaya
Cc: dmaengine, timur, cov, linux-arm-msm, linux-arm-kernel, linux-kernel
On Thu, Sep 01, 2016 at 10:02:55AM -0400, Sinan Kaya wrote:
> Dmatest is currently including compare and fill time into the
> calculated performance numbers. This does not reflect the HW
> capability and the results vary based on the CPU speed instead of
> the HW speed.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-02 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 14:02 [PATCH V3] dmaengine: dmatest: exclude compare and fill time during perf report Sinan Kaya
2016-09-02 11:07 ` 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).