From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932849AbcHVQ6a (ORCPT ); Mon, 22 Aug 2016 12:58:30 -0400 Received: from mga04.intel.com ([192.55.52.120]:24236 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932286AbcHVQ62 (ORCPT ); Mon, 22 Aug 2016 12:58:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,561,1464678000"; d="scan'208";a="593419" From: "Jiang, Dave" To: "hofrat@osadl.org" , "jdmason@kudzu.us" CC: "Allen.Hubbe@emc.com" , "logang@deltatee.com" , "linux-kernel@vger.kernel.org" , "sudipm.mukherjee@gmail.com" , "arnd@arndb.de" , "linux-ntb@googlegroups.com" Subject: Re: [PATCH 2/2] ntb: make DMA_OUT_RESOURCE_TO HZ independent Thread-Topic: [PATCH 2/2] ntb: make DMA_OUT_RESOURCE_TO HZ independent Thread-Index: AQHR/JUlNmjc5HiYLUGYvbMT/swsLKBVqN2A Date: Mon, 22 Aug 2016 16:58:27 +0000 Message-ID: <1471885081.3770.129.camel@intel.com> References: <1471884696-25558-1-git-send-email-hofrat@osadl.org> <1471884696-25558-2-git-send-email-hofrat@osadl.org> In-Reply-To: <1471884696-25558-2-git-send-email-hofrat@osadl.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [143.182.137.38] Content-Type: text/plain; charset="utf-8" Content-ID: <12260D3AE540CE4180F4182AB6ABB8F9@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u7MGwakA016795 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 Acked-by: Dave Jiang > --- > > 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 >