Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4881871pjb; Mon, 27 Jul 2020 07:30:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBe+smjI2wGKKwQEBjkRJvTbpfqKujiXYd1xiVZ77+YJryRF3P9wDfNWKLxsALiOsu8l8S X-Received: by 2002:a17:906:7155:: with SMTP id z21mr16359184ejj.282.1595860240648; Mon, 27 Jul 2020 07:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860240; cv=none; d=google.com; s=arc-20160816; b=w8k/xoLT1K57kq+AUbLFfwQy1XQmUWq4vgGjCbEo1p0wpFeDisuEM7ZB6j4O00bOfH emgNIISUPLmL7ryKP6z/V4QSewk7I/fpgj6f8nGR4gHcEWUwduOQVuF/eYkYAAdNhHmx WoAqecgWMUkiZb4NyKJngRBcQmehBr9pvMo4MqzSvyx8nBJFwb9pPExssXQKb7TxxgJ1 gkJ3db7kBDPTnxa4scHWT117zSX/witYSLSFyGCPt22nadg0tFPSR53ghHVuYqlIMnsG q25Pgy3RgC22y3K/BAtLke/HrfBl7jj9vvK5e1mVOpmDoeHtNzoKw8v0VPS2sl8MO/bJ I0bQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JuX/haUYqr7rbz27ZOmmug1g5XPrXaKiYOf1fgdowHg=; b=CVcxdTNa3+zh32AbbPrQVvcAKH3/jdXAbl1Sxmcv0t1292kBLGRISOh1EOpXTITR1t NHqp0muez82dMfqyorVT6BXYp38sNPkGBzRairbSh0T6B7F9ncublLbsF+KcsJkLS8au BOXhtZYcHtbW/KSW/Fu/2dQeZoNgAzKsevNmW4ZQxNvN5AisKnyKJv8SX3iOXGR/ErfK Hydv9hmveb2JN6nlC2Co5yRkA8bKy0YYTdUiAgkg3OqZfBJsEqujCyjkMmt3gV5PijUV 72EboDAM6Qp1KduvqIpdgHZbJCzg4rqx8qxOnd07QOMhU1bzTcrXvRxi8qpUfYOrhzHb fUkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fRYKv5Hs; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si5531697ejd.290.2020.07.27.07.30.15; Mon, 27 Jul 2020 07:30:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b=fRYKv5Hs; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732183AbgG0O3E (ORCPT + 99 others); Mon, 27 Jul 2020 10:29:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:53284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732148AbgG0OXz (ORCPT ); Mon, 27 Jul 2020 10:23:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 298392083E; Mon, 27 Jul 2020 14:23:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859834; bh=RBYFblPQop8OJr48l7BkzZOT8znndds4pQrFRWY0Whw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fRYKv5HsB+earQUKGgQN9R9IHsR9TqpdC1Yck1xqr9al0zJq45I+fe4NXL/yQiSGl dUGhq8zWx6xCS2KQE8vG94X0UoBxcC8uwBgE0ldQ2rM2kIPuvl7ys4BdFZdIa5lMIR ReXYmn/0GanCglR1/cLvW7ajCSYaW86WumQkyPjA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leonid Ravich , Dave Jiang , Vinod Koul , Sasha Levin Subject: [PATCH 5.7 116/179] dmaengine: ioat setting ioat timeout as module parameter Date: Mon, 27 Jul 2020 16:04:51 +0200 Message-Id: <20200727134938.305043891@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leonid Ravich [ Upstream commit 87730ccbddcb48478b1b88e88b14e73424130764 ] 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 Link: https://lore.kernel.org/r/20200701184816.29138-1-leonid.ravich@dell.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- 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 18c011e57592e..8e2a4d1f0be53 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 b8e8e0b9693c7..4ac9134962f3b 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h @@ -99,8 +99,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; -- 2.25.1