Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp871095ybt; Wed, 1 Jul 2020 12:05:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzepsKqrRixwcUAJzSkZcoqmbBQEnjFtm9lt6CUmTpG3UPqlqUhR2lBGGgRNFQ08kIMVbCk X-Received: by 2002:a17:907:2149:: with SMTP id rk9mr23696704ejb.553.1593630315332; Wed, 01 Jul 2020 12:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593630315; cv=none; d=google.com; s=arc-20160816; b=p5aVQh0XVLikP041ILizY1I6XI3phkqlAF0L0O7Oj73G0jfXOpoDKyKXvhxhYClkHx E0Z7bw0vmHJk/c5gjJYUT1dCyHrbk6LzckWqPIIiHludPvFvZ1un5lloX1V7uB0xAH7p 6rbpKd7mrzeyeu86hbjvz7LjfGKjoeeTrXLWoJYui1t4UX/gW/qm3oM7rW0he+bUq+D1 paYxuTsyCqobs1mtRVnEsItUgiDrxGtk05eNjEPMHWH069urBiH9XjVPwfwosZMPQ1OM 37aDgxpFivLr44VjfDqLjvCep8lS9vIueCoylsu+50GKor303GdZ5G+Dj0kevp4krG9t TgFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=lWwc8t0xHOtHqkkezOjUufOeukkBBpISW1zkoOV4bek=; b=tf4Y+ofJJ8ZAhUqxtpWB6IPHJVw3bE2bTJaunLKAr+IQ7FVLqwOgj4kUMo7JFSNKmO M0Y4iUynRM3RB/c8xuYDG/RiTHpGio0vUl55GKktuI3d+VVBbAiCCLvEE7AYjTwaOMay 24q3EtnFZf0IMvYeTf9OdXs9EyN2XQsiZGtMAoQSupkvMcg5e3ikZSI4Li7Ox5lj8Q5D bQ7loXkC/hGWrCU8lcqwNOFUMXTi9AIa8W/FRDHZQQK/gML42CmUd8aOC0KmwA1Z1R+n mKRDDw056q53so1XWWkYk9PKFEo5xGO7Znfv6BXFpvn7B/ywMjQ6Ot8GxOZDH+NxJ2Tz dAow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si4302219ejr.68.2020.07.01.12.04.51; Wed, 01 Jul 2020 12:05:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbgGATEl (ORCPT + 99 others); Wed, 1 Jul 2020 15:04:41 -0400 Received: from mga14.intel.com ([192.55.52.115]:2061 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725915AbgGATEl (ORCPT ); Wed, 1 Jul 2020 15:04:41 -0400 IronPort-SDR: YivStrRSMl8pcRhYApL9o/UJ4FoQjxZxrw94Qaz6UOD22z9WCH7WIW9auuidlkYUlpj5f32QLc 2bPsRdXOhyOQ== X-IronPort-AV: E=McAfee;i="6000,8403,9669"; a="145770791" X-IronPort-AV: E=Sophos;i="5.75,301,1589266800"; d="scan'208";a="145770791" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2020 12:04:40 -0700 IronPort-SDR: TmYcEGuJoZOZhWXu8giYBKcgpObZcCVPphl14dwMkc43f9cLplBsWFvwcwUfa/J0W+nVScd4+V GRDeLKYUlt5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,301,1589266800"; d="scan'208";a="481404699" Received: from djiang5-mobl1.amr.corp.intel.com (HELO [10.209.136.35]) ([10.209.136.35]) by fmsmga006.fm.intel.com with ESMTP; 01 Jul 2020 12:04:39 -0700 Subject: Re: [PATCH v2] dmaengine: ioat setting ioat timeout as module parameter To: leonid.ravich@dell.com, dmaengine@vger.kernel.org Cc: lravich@gmail.com, Dan Williams , Vinod Koul , "Alexander.Barabash@dell.com" , linux-kernel@vger.kernel.org References: <20200701140849.8828-1-leonid.ravich@dell.com> <20200701184816.29138-1-leonid.ravich@dell.com> From: Dave Jiang Message-ID: <5c19ef4f-21ce-04ec-0ea9-685a1885a50a@intel.com> Date: Wed, 1 Jul 2020 12:04:38 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200701184816.29138-1-leonid.ravich@dell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/1/2020 11:48 AM, leonid.ravich@dell.com wrote: > From: Leonid Ravich > > DMA transaction time to completion is a function of > PCI bandwidth,transaction size and a queue depth. > So hard coded value for timeouts might be wrong > for some scenarios. > > Signed-off-by: Leonid Ravich Reviewed-by: Dave Jiang > --- > Changing in v2 > - misspelling of completion > drivers/dma/ioat/dma.c | 12 ++++++++++++ > drivers/dma/ioat/dma.h | 2 -- > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c > index 8ad0ad861c86..fd782aee02d9 100644 > --- a/drivers/dma/ioat/dma.c > +++ b/drivers/dma/ioat/dma.c > @@ -26,6 +26,18 @@ > > #include "../dmaengine.h" > > +int completion_timeout = 200; > +module_param(completion_timeout, int, 0644); > +MODULE_PARM_DESC(completion_timeout, > + "set ioat completion timeout [msec] (default 200 [msec])"); > +int idle_timeout = 2000; > +module_param(idle_timeout, int, 0644); > +MODULE_PARM_DESC(idle_timeout, > + "set ioat idel timeout [msec] (default 2000 [msec])"); > + > +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) > +#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout) > + > static char *chanerr_str[] = { > "DMA Transfer Source Address Error", > "DMA Transfer Destination Address Error", > diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h > index e6b622e1ba92..f7f31fdf14cf 100644 > --- a/drivers/dma/ioat/dma.h > +++ b/drivers/dma/ioat/dma.h > @@ -104,8 +104,6 @@ struct ioatdma_chan { > #define IOAT_RUN 5 > #define IOAT_CHAN_ACTIVE 6 > struct timer_list timer; > - #define COMPLETION_TIMEOUT msecs_to_jiffies(100) > - #define IDLE_TIMEOUT msecs_to_jiffies(2000) > #define RESET_DELAY msecs_to_jiffies(100) > struct ioatdma_device *ioat_dma; > dma_addr_t completion_dma; >