Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp752549ybz; Wed, 22 Apr 2020 07:23:46 -0700 (PDT) X-Google-Smtp-Source: APiQypJa0bQjPtB0ITerQNMn88kKWRZp21806UtVdWuFWxU5zgsHQChdKVaQlqedqDc1qzYYzgUR X-Received: by 2002:a17:906:17c1:: with SMTP id u1mr9609343eje.47.1587565426519; Wed, 22 Apr 2020 07:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587565426; cv=none; d=google.com; s=arc-20160816; b=ssuiCIeb0wLC2RofLgOouIBWhAzurjfzoCRHD9787E+2qQgTq1vnNJYuPgzK1oJZD6 /Gj65Ds87+QTuKQHhJgeoEnsBWhyVeJY4b0wJMr8qCAUciJ4zvC0xPjioLq7ZQBCfC8E hbUuB9MIJqCB3FZxsX5j8UvWfNXueLudZZJxoEWYPs06ZMVHCFiyShoFc3yRuTZWdHvs OaiTzY13JzInBtYBOFE8W7VtYh+AWPjYmebDtr755vCKwOsrCzbCF3ieTH1pjZE7sB/Y GczZ2SAlKuPBxqNndVxbkZJ2tbtpkSH/SYg6e6m0Go5GbPGxW+r9ZCixY+Rb4vwou9Zh Zzuw== 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=iOKnntas/3zTQFHwnnHq2Dg7S4tVgFE5hNtGco+ZmhI=; b=BQdnJcicmtqWtPfTJfiTMOpuiet9jF1KxEF881SR0RF5VfbyTFTUp8LD3TORb1odIM XT6nFnWcEW78KcUZAdPWZH+H0l5gE5jL9NX+HWcZN7n5mlPLzr5n+FBZHg3mARzVh+Jd O+HT0hO1ORHH3nmM7ML+2C97plygNNfSbUkOIM5N8UFrgCKzTq4YGpH0tEqsXiOI+nRS l0kQQ1w5SYJwLK7auafUyrL/3dkBa0c8f1gN4uf8Yx2M8JmXVXJHljrj88xZNbTtFlDY j4QRjsK0s0w00cxNxyEfBLivzbYnqPdGwW/UdkMXb0wsQbaNwC2HcO9Q3l0yW5qkBY4v yy2A== 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 ce3si4324530edb.286.2020.04.22.07.23.15; Wed, 22 Apr 2020 07:23:46 -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 S1726969AbgDVOVM (ORCPT + 99 others); Wed, 22 Apr 2020 10:21:12 -0400 Received: from mga05.intel.com ([192.55.52.43]:59462 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbgDVOVM (ORCPT ); Wed, 22 Apr 2020 10:21:12 -0400 IronPort-SDR: IALa/HM26DhQi05Amo6LsEBg6DcPj86aTWPwGY/OVayfzlEKz48+YPNjef8J52GPPyaTZ+yMTm YMf3KGH8xMxQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 07:21:12 -0700 IronPort-SDR: RqFf85vPdG7OhYGX/uy86+jJlceh0IcUTUhO7yDiQIKsg98+tvEIvJiMI2uLuBJYrcwFTN7xEl d3czeR6kZXBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,414,1580803200"; d="scan'208";a="457156383" Received: from djiang5-mobl1.amr.corp.intel.com (HELO [10.134.45.139]) ([10.134.45.139]) by fmsmga006.fm.intel.com with ESMTP; 22 Apr 2020 07:21:11 -0700 Subject: Re: [PATCH 3/3] dmaengine: ioat: adding missed issue_pending to timeout handler To: leonid.ravich@dell.com, dmaengine@vger.kernel.org Cc: lravich@gmail.com, Dan Williams , Vinod Koul , Allison Randal , Alexios Zavras , Thomas Gleixner , "Alexander.Barabash@dell.com" , linux-kernel@vger.kernel.org References: <1587554529-29839-1-git-send-email-leonid.ravich@dell.com> <1587554529-29839-3-git-send-email-leonid.ravich@dell.com> From: Dave Jiang Message-ID: <68c65d83-58fe-f2cb-d505-9b216caa1f4b@intel.com> Date: Wed, 22 Apr 2020 07:21:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1587554529-29839-3-git-send-email-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 4/22/2020 4:22 AM, leonid.ravich@dell.com wrote: > From: Leonid Ravich > > completion timeout might trigger unnesesery DMA engine hw reboot > in case of missed issue_pending() . Just curious, are you hitting a use case where this is happening? And what's causing the completion timeout? > > Signed-off-by: Leonid Ravich > --- > drivers/dma/ioat/dma.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c > index 55a8cf1..2ab07a3 100644 > --- a/drivers/dma/ioat/dma.c > +++ b/drivers/dma/ioat/dma.c > @@ -955,6 +955,13 @@ void ioat_timer_event(struct timer_list *t) > goto unlock_out; > } > > + /* handle missed issue pending case */ > + if (ioat_ring_pending(ioat_chan)) { > + spin_lock_bh(&ioat_chan->prep_lock); > + __ioat_issue_pending(ioat_chan); > + spin_unlock_bh(&ioat_chan->prep_lock); > + } > + > set_bit(IOAT_COMPLETION_ACK, &ioat_chan->state); > mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT); > unlock_out: >