Re: Dmatest Behavior

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

 



On Thu, May 19, 2016 at 01:39:58PM -0400, Sinan Kaya wrote:
 
> From ec9f4480fac1648e9f53112b143a535774e3795d Mon Sep 17 00:00:00 2001
> From: Sinan Kaya <okaya@xxxxxxxxxxxxxx>
> Date: Wed, 18 May 2016 16:57:15 -0400
> Subject: [PATCH] dmatest: exclude compare and fill time during performance
>  report
> 
> Change-Id: I3428a85c3a58f990b985fc10fe736dfb3e56b206

We dont want these here...

> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -416,7 +416,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;
>  
> @@ -517,6 +519,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);
>  
> @@ -527,6 +530,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);

If you are very picky about perf, shouldn't we just track time here and then
later do subtraction to get diff

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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