public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jiang, Dave" <dave.jiang@intel.com>
To: "hofrat@osadl.org" <hofrat@osadl.org>,
	"jdmason@kudzu.us" <jdmason@kudzu.us>
Cc: "Allen.Hubbe@emc.com" <Allen.Hubbe@emc.com>,
	"logang@deltatee.com" <logang@deltatee.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"sudipm.mukherjee@gmail.com" <sudipm.mukherjee@gmail.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"linux-ntb@googlegroups.com" <linux-ntb@googlegroups.com>
Subject: Re: [PATCH 2/2] ntb: make DMA_OUT_RESOURCE_TO HZ independent
Date: Mon, 22 Aug 2016 16:58:27 +0000	[thread overview]
Message-ID: <1471885081.3770.129.camel@intel.com> (raw)
In-Reply-To: <1471884696-25558-2-git-send-email-hofrat@osadl.org>


On Mon, 2016-08-22 at 18:51 +0200, Nicholas Mc Guire wrote:
> schedule_timeout_* takes a timeout in jiffies but the code currently
> is
> passing in a constant which makes this timeout HZ dependent, so pass
> it
> through msecs_to_jiffies() to fix this up.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>

Acked-by: Dave Jiang <dave.jiang@intel.com>


> ---
> 
> Problem found by coccinelle script
> 
> The below patch sets the timeout to 50ms - not clear what HZ setting
> was
> assumed during design/testing, so this needs an ack by someone who
> knows
> the driver and can confirm that 50ms is reasonable to wait on DMA
> retries.
> 
> Patch was compile tested with: x86_64_defconfig + CONFIG_NTB=m,
> CONFIG_NTB_PERF=m
> 
> Patch is against 4.8.0-rc2 (localversion-next is -next-20160822)
> 
>  drivers/ntb/test/ntb_perf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ntb/test/ntb_perf.c
> b/drivers/ntb/test/ntb_perf.c
> index 6a50f20..e065b69 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -72,7 +72,7 @@
>  #define MAX_THREADS		32
>  #define MAX_TEST_SIZE		SZ_1M
>  #define MAX_SRCS		32
> -#define DMA_OUT_RESOURCE_TO	50
> +#define DMA_OUT_RESOURCE_TO	msecs_to_jiffies(50)
>  #define DMA_RETRIES		20
>  #define SZ_4G			(1ULL << 32)
>  #define MAX_SEG_ORDER		20 /* no larger than 1M for
> kmalloc buffer */
> -- 
> 2.1.4
> 

  reply	other threads:[~2016-08-22 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22 16:51 [PATCH 1/2] ntb_transport: make DMA_OUT_RESOURCE_TO HZ independent Nicholas Mc Guire
2016-08-22 16:51 ` [PATCH 2/2] ntb: " Nicholas Mc Guire
2016-08-22 16:58   ` Jiang, Dave [this message]
2016-08-23 16:43     ` Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471885081.3770.129.camel@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Allen.Hubbe@emc.com \
    --cc=arnd@arndb.de \
    --cc=hofrat@osadl.org \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntb@googlegroups.com \
    --cc=logang@deltatee.com \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox