Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1040467pxb; Tue, 26 Oct 2021 01:33:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd53sAmRvTydnf9ltYA/iTAJS+8f3b7NpesS1aK4VpJ1uZSg50cURc9rihpXXiBY46p21E X-Received: by 2002:a63:295:: with SMTP id 143mr18015602pgc.334.1635237212190; Tue, 26 Oct 2021 01:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635237212; cv=none; d=google.com; s=arc-20160816; b=ooD4GkDwchszHnsdivUfH7sEeVYJ97gHuI6fekitdYpqwB/xq+bF4hEC6WgM6w42R7 cEKMhQHckg9QKWTOoEPE0PIUwQ9o7EP+spIiGlwWIDLckXrkSOYV3g1R5TTTSuoKJDfZ AmUYIV4SIs5QRuwWX9q7yhX767bXNu4c81mgGXdycRhXrHXf6l5jTReBvn+CEU6T5CVe D2jJcw/sKPQgqIWSL1VwtGQnexQTXvH7NluCvT5Ap9bu8EWOOVUH2j9Za9R3JDcHnWWy KnrCtwMsZ93O+cB1zne/BS2LLHpkIYruRrBblI9RjE/PCpE11pI/1qhTkFbz+s8EAY+9 dA/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5p+n+ZRG80jbql5OekKuKqhuYx3gVa/l0Ah/SrSPFoY=; b=M+bD3Ci7Y1oKiz9C7zLN69fFEqn1PjgDnruWM2ewFtkBPmNVUhN/MNckF//wJOLqxC ybhpSqiPe8LFodbt2CmfIy4sf01lrmNuC5fYQQOwL28krGSuKDouzUTytJxEKoIxl2qe 4mjWHobRe8533ya3Dccrrgc4pfDGfjAen37d9bITE5uOsL87Ak0QpYqWzJ4tjAkYIKsG PQNBdCVWBIp2ZvPXu/9YTxBR+U6x3gi+z/FQ0dSz0tXsbmlzqQWG7frVsY1/iBLoMvTW GKkacGmSdQ6OtW8uzt4hVC+JfJPgBETkzWvMi9/U50DkdGbnJ1ew0ZOiV6uoN0v4oKOK lKSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rzAfIKq2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c24si26772490pgb.283.2021.10.26.01.33.18; Tue, 26 Oct 2021 01:33:32 -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=k20201202 header.b=rzAfIKq2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230226AbhJZESF (ORCPT + 99 others); Tue, 26 Oct 2021 00:18:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:54540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbhJZESE (ORCPT ); Tue, 26 Oct 2021 00:18:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDDD360EDF; Tue, 26 Oct 2021 04:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635221741; bh=Upw18BMnAJNHZIJJpkphWj/uFqecyQTLJdSZFRJJJPU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rzAfIKq2hSoaUzW7YoqAGIOnLTuzUnaq2pQdkh0Iug5i0X7VdQz6TG/2QxUbIg80t 2LBsKVXMtntLEKIhEGSzVo8H8nvxZalkrQS8XWjlT8PPIjj0TF8Y8NezKGjRHRo+6+ WRehkG7fs1xGbuooYpfn1xccuePsl7oKhBX5eDU7h4f4uCg1wzT2aVvPyWad5MZ7cD oCCmVtikSjUPj9qU9FlSYA3Mxn/NbT7jexhdTVuCwdjN6LhCsooiozVuhYlEkLwDe4 QOYpytUkqhZws97aGeK3Bmw49JefgJmPlS5/mZgY6DxNhIl9G5ygHkM5HnUofhhRKr 6wmGShRuGQ+wQ== Date: Mon, 25 Oct 2021 21:15:38 -0700 From: Keith Busch To: Li Chen Cc: Bjorn Helgaas , "linux-pci@vger.kernel.org" , Lorenzo Pieralisi , Rob Herring , "kw@linux.com" , Bjorn Helgaas , "linux-kernel@vger.kernel.org" , Tom Joseph , Jens Axboe , Christoph Hellwig , Sagi Grimberg , "linux-nvme@lists.infradead.org" Subject: Re: [EXT] Re: nvme may get timeout from dd when using different non-prefetch mmio outbound/ranges Message-ID: <20211026041538.GB2335242@dhcp-10-100-145-180.wdc.com> References: <20211025154739.GA4760@bhelgaas> <20211025162158.GA2335242@dhcp-10-100-145-180.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 03:40:54AM +0000, Li Chen wrote: > My nvme is " 05:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 980". From its datasheet, https://s3.ap-northeast-2.amazonaws.com/global.semi.static/Samsung_NVMe_SSD_980_Data_Sheet_Rev.1.1.pdf, it says nothing about CMB/SQEs, so I'm not sure. Is there other ways/tools(like nvme-cli) to query? The driver will export a sysfs property for it if it is supported: # cat /sys/class/nvme/nvme0/cmb If the file doesn't exist, then /dev/nvme0 doesn't have the capability. > > > I don't know how to interpret "ranges". Can you supply the dmesg and > > > "lspci -vvs 0000:05:00.0" output both ways, e.g., > > > > > > pci_bus 0000:00: root bus resource [mem 0x7f800000-0xefffffff window] > > > pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window] > > > pci 0000:05:00.0: [vvvv:dddd] type 00 class 0x... > > > pci 0000:05:00.0: reg 0x10: [mem 0x.....000-0x.....fff ...] > > > > > > > Question: > > > > 1. Why dd can cause nvme timeout? Is there more debug ways? > > > > That means the nvme controller didn't provide a response to a posted > > command within the driver's latency tolerance. > > FYI, with the help of pci bridger's vendor, they find something interesting: "From catc log, I saw some memory read pkts sent from SSD card, but its memory range is within the memory range of switch down port. So, switch down port will replay UR pkt. It seems not normal." and "Why SSD card send out some memory pkts which memory address is within switch down port's memory range. If so, switch will response UR pkts". I also don't understand how can this happen? I think we can safely assume you're not attempting peer-to-peer, so that behavior as described shouldn't be happening. It sounds like the memory windows may be incorrect. The dmesg may help to show if something appears wrong.