Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp240246ybj; Thu, 19 Sep 2019 13:39:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxztWQv3eCadrmJu39R7mNmOM+plANvKb0iUPQDpsVNt0kUeWjTZkky2OPYhvIudvuQp0yr X-Received: by 2002:a05:6402:1f4:: with SMTP id i20mr18270490edy.137.1568925562002; Thu, 19 Sep 2019 13:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568925561; cv=none; d=google.com; s=arc-20160816; b=Ov/qzgedcYpoOS8jxYRUScupiNOrKS/3Nk9KILyGApk4JdKHVfAlXnalAhyy7WF2pT I5cplkp3XfK8J5PIsh3Tuf/BbA0MEcXmsdRul+EJPQ6Iow2cuGhYrRE7YhuMldHvSHfb egsMnyE8SOGujc/Pi9T1a2gR3iwQROzRDuwxCKcJ0fai6w0ySgIkDo7469WMlaCFjDed LbJQ78qsZQQx/oH9VWutYd1qR93S2+SNJTaTwL4xAUtsspffEJgM+jLJ85F6YkLkjR2j y55f2bvCjUi/uHQQ+GLGt8cFjUXJbkOVQo565W/3vUpSeAzYR8wSFIuvtis6k6KYhsPf ZR7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+JnGwvORAxeevr3GXOLRaZIxfgB++4rgMutcxb7CRdg=; b=dYRd/a3eUVBzvLl1V59KagdUs0AgWiVSCheM+BWmZqJG5cZl2UGlS2pf7YgkAZ8wqN ADySsomRyiZghSFb2K9oRvqnj13oBtfjRQgTx5lB+2CcOeUZs/wugN5B9ohXZKaJ+g9p 3TJzc8JKYjaixK7xLpdwoJc+kAoSu8WJuZ0MCs4bx2duHpyElItBt419NER7jijE7pX1 xmIKdmVV3gvBfrUQ6pmE9slkV0jkZmWx8m3BMJVTJMKlWkYvygXCfwpE+tLx2zU9zQUI K8NKaT1SmidlXfAP8w5gkRCTN2lwGp85j8LLCfX3q1JqOZEA6/tatATXdbbmT1Q31Ylu IpEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jN4dbbHT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si6332605edf.102.2019.09.19.13.38.59; Thu, 19 Sep 2019 13:39:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jN4dbbHT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732446AbfISONE (ORCPT + 99 others); Thu, 19 Sep 2019 10:13:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732299AbfISONE (ORCPT ); Thu, 19 Sep 2019 10:13:04 -0400 Received: from C02WT3WMHTD6 (unknown [8.36.226.102]) (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 329CD2067B; Thu, 19 Sep 2019 14:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568902383; bh=Fduf10OMcAOvnRZMP54/18uKfFU1Trz0JGIfeGeiB4A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jN4dbbHT21aYx902Chc1XXK8Kdi9Df4rkc3LIUIfNdMNrCDpcMm/HGWxuJVKpj41j UqzqSFg+JVY61WyyiE6LgTiPPxrk3kXuwgSfcumAmWgylc/3arkAL47IZGS0bxVKeY +VVd/nu3WZlz/ol+YKw71u/gNP84D1k5TAXs8uDk= Date: Thu, 19 Sep 2019 08:13:01 -0600 From: Keith Busch To: Bharat Kumar Gogada Cc: "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , Keith Busch , "keith.busch@intel.com" Subject: Re: NVMe Poll CQ on timeout Message-ID: <20190919141301.GA61660@C02WT3WMHTD6> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 19, 2019 at 01:47:50PM +0000, Bharat Kumar Gogada wrote: > Hi All, > > We are testing NVMe cards on ARM64 platform, the card uses MSI-X interrupts. > We are hitting following case in drivers/nvme/host/pci.c > /* > * Did we miss an interrupt? > */ > if (__nvme_poll(nvmeq, req->tag)) { > dev_warn(dev->ctrl.device, > "I/O %d QID %d timeout, completion polled\n", > req->tag, nvmeq->qid); > return BLK_EH_DONE; > } > > Can anyone tell when does nvme_timeout gets invoked ? Timeout is invoked when the driver didn't see a completion to a submitted command. > In what cases we see this interrupt miss ? That usually happens for one of two reasons: 1. The device didn't send any MSIx message for a CQE 2. The device sent the MSIx message before posting the CQE I've also seen h/w errata where the MSIx and CQE are re-ordered, which can also lead to this. A hardware trace would provide the most detailed view of what's happening. You might be able to infer if you carefully account for commands sent, interrupts received, and spurious interrupts detected. > We are seeing this issue only for reads with following fio command > fio --name=randwrite --ioengine=libaio --iodepth=1 --rw=randread --bs=128k --direct=0 \ > --size=128M --numjobs=3 --group_reporting --filename=/dev/nvme0n1 > > We are not seeing issue with --rw=randwrite for same size. > > Please let us know what can cause this issue.