Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2979003pxu; Mon, 14 Dec 2020 16:44:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJ3tAVQNh3lEBPsYyAXfSH0JgQ2HGym/cXCUL7dQCYnjaK+iY8+jipIMihLudF+iKiFf0D X-Received: by 2002:a17:906:b217:: with SMTP id p23mr25176836ejz.461.1607993087232; Mon, 14 Dec 2020 16:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607993087; cv=none; d=google.com; s=arc-20160816; b=SgdIxAzamwCLSiJmOb/yCFuo7Hs7+VE/d8adbcEz6oDFY7Q6+IhuDBDK+C+yLLSl3Y symLzjUUaob3OMn6DNkcKM7Q23w+rI5ZAfCBHsQVOcXRx8/dhTbMbb7vCU3qcGdEOlhp jJMlGPRm5kmi6SoSwB+wfoMuEdlfNkTdDeY2glMzBflZGqYz52pg103iZQtrwZNcP8I2 3P2v3ZBoKCN4GcAfj6TW3599ikqqwRGkaKw+Z2OORSKWBO0OCrzfVky0Xm9ODdMw1peI 3A121KotylmTCjtLQGoXSzGGhJkWHllA5ejr3ztggrHlbrquHSF4kmnpUuUATt8e4wjd yzuw== 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 :message-id:subject:cc:to:from:dkim-signature:date; bh=MFnAqk/H85yLhBM6mLEEyzxVyi8pTds2SOR4nT6kS0k=; b=kPOUIHRkA4rYelFje5DtKY9iG99bKdFuNVZ2zKkMN1tQeQG0IjEv7dKBGh+vLehyc+ xrCDXC6eVzCNZPaayRgoovNQaGyW5j8qZ1AYOIhgkAnUloJwr4x++OcDHlckBTpNqecJ ijcpkq3Qa0viR8Yj56COxUB17J7W71c9qSZbxVnqC5xswtoqRg+P77tXp4E5SwKcMNO/ I3tHT9zM5zYv8MqW05GaRgAKOz+BvbAL3do/6KG+6UCDrwfPFFbT/5Skb+mmsecYFmjA HAfw0ORBnLcHjqHhoD+pjhRQyH7eVasV7mB4Ef1lqQbqIFURyrxixLry6GzBjOJVv5UL F1rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jQUvwXxY; 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 q9si59312ejm.460.2020.12.14.16.44.24; Mon, 14 Dec 2020 16:44:47 -0800 (PST) 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=jQUvwXxY; 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 S1726461AbgLOAkr (ORCPT + 99 others); Mon, 14 Dec 2020 19:40:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:33430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbgLOAkr (ORCPT ); Mon, 14 Dec 2020 19:40:47 -0500 Date: Mon, 14 Dec 2020 18:40:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607992806; bh=vYzB5Bh2gjJmR+HAPUYeomnVTXQmhB/jJBx2y7DbXeo=; h=From:To:Cc:Subject:In-Reply-To:From; b=jQUvwXxYDu5SKP/A+dyoyRW29wX3IPVvnREKIErgNy6/qIXo0xiuPh8rgU+m8KLG4 UWVqN6qXpxRzznGDBbh+3JBeGmE94kSgBPP0Dv6a1TZZb8pPu9y3Ifx7ZzXLnd2USd LkEyvCWm5TWIdi/Hj5kKweAB8GrnrZneVo7sbCuaiUo86LmlKfrHiZDdlPHzHcTA4j VNx2qMtwvXp8sH5MgK6u1ZjUGU11lLZW8rOkefVgwi+4maFkHTurVkGlrpeo4ZSAkk G1Cl9CEy01MXqdQpYMdo2jGWDb1lCZsV7e2Zkbe+LYBDt+SRflUv3rgBfEs60JbIe3 +VfBXq4Zo0dhQ== From: Bjorn Helgaas To: Ian Kumlien Cc: Kai-Heng Feng , linux-pci , Alexander Duyck , "Saheed O. Bolarinwa" , Puranjay Mohan , Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , Heiner Kallweit , intel-wired-lan , Linux Kernel Network Developers , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/3] PCI/ASPM: Use the path max in L1 ASPM latency check Message-ID: <20201215004004.GA280628@bjorn-Precision-5520> 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 Mon, Dec 14, 2020 at 11:56:31PM +0100, Ian Kumlien wrote: > On Mon, Dec 14, 2020 at 8:19 PM Bjorn Helgaas wrote: > > If you're interested, you could probably unload the Realtek drivers, > > remove the devices, and set the PCI_EXP_LNKCTL_LD (Link Disable) bit > > in 02:04.0, e.g., > > > > # RT=/sys/devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:04.0 > > # echo 1 > $RT/0000:04:00.0/remove > > # echo 1 > $RT/0000:04:00.1/remove > > # echo 1 > $RT/0000:04:00.2/remove > > # echo 1 > $RT/0000:04:00.4/remove > > # echo 1 > $RT/0000:04:00.7/remove > > # setpci -s02:04.0 CAP_EXP+0x10.w=0x0010 > > > > That should take 04:00.x out of the picture. > > Didn't actually change the behaviour, I'm suspecting an errata for AMD pcie... > > So did this, with unpatched kernel: > [ ID] Interval Transfer Bitrate Retr Cwnd > [ 5] 0.00-1.00 sec 4.56 MBytes 38.2 Mbits/sec 0 67.9 KBytes > [ 5] 1.00-2.00 sec 4.47 MBytes 37.5 Mbits/sec 0 96.2 KBytes > [ 5] 2.00-3.00 sec 4.85 MBytes 40.7 Mbits/sec 0 50.9 KBytes > [ 5] 3.00-4.00 sec 4.23 MBytes 35.4 Mbits/sec 0 70.7 KBytes > [ 5] 4.00-5.00 sec 4.23 MBytes 35.4 Mbits/sec 0 48.1 KBytes > [ 5] 5.00-6.00 sec 4.23 MBytes 35.4 Mbits/sec 0 45.2 KBytes > [ 5] 6.00-7.00 sec 4.23 MBytes 35.4 Mbits/sec 0 36.8 KBytes > [ 5] 7.00-8.00 sec 3.98 MBytes 33.4 Mbits/sec 0 36.8 KBytes > [ 5] 8.00-9.00 sec 4.23 MBytes 35.4 Mbits/sec 0 36.8 KBytes > [ 5] 9.00-10.00 sec 4.23 MBytes 35.4 Mbits/sec 0 48.1 KBytes > - - - - - - - - - - - - - - - - - - - - - - - - - > [ ID] Interval Transfer Bitrate Retr > [ 5] 0.00-10.00 sec 43.2 MBytes 36.2 Mbits/sec 0 sender > [ 5] 0.00-10.00 sec 42.7 MBytes 35.8 Mbits/sec receiver > > and: > echo 0 > /sys/devices/pci0000:00/0000:00:01.2/0000:01:00.0/link/l1_aspm BTW, thanks a lot for testing out the "l1_aspm" sysfs file. I'm very pleased that it seems to be working as intended. > and: > [ ID] Interval Transfer Bitrate Retr Cwnd > [ 5] 0.00-1.00 sec 113 MBytes 951 Mbits/sec 153 772 KBytes > [ 5] 1.00-2.00 sec 109 MBytes 912 Mbits/sec 276 550 KBytes > [ 5] 2.00-3.00 sec 111 MBytes 933 Mbits/sec 123 625 KBytes > [ 5] 3.00-4.00 sec 111 MBytes 933 Mbits/sec 31 687 KBytes > [ 5] 4.00-5.00 sec 110 MBytes 923 Mbits/sec 0 679 KBytes > [ 5] 5.00-6.00 sec 110 MBytes 923 Mbits/sec 136 577 KBytes > [ 5] 6.00-7.00 sec 110 MBytes 923 Mbits/sec 214 645 KBytes > [ 5] 7.00-8.00 sec 110 MBytes 923 Mbits/sec 32 628 KBytes > [ 5] 8.00-9.00 sec 110 MBytes 923 Mbits/sec 81 537 KBytes > [ 5] 9.00-10.00 sec 110 MBytes 923 Mbits/sec 10 577 KBytes > - - - - - - - - - - - - - - - - - - - - - - - - - > [ ID] Interval Transfer Bitrate Retr > [ 5] 0.00-10.00 sec 1.08 GBytes 927 Mbits/sec 1056 sender > [ 5] 0.00-10.00 sec 1.07 GBytes 923 Mbits/sec receiver > > But this only confirms that the fix i experience is a side effect. > > The original code is still wrong :) What exactly is this machine? Brand, model, config? Maybe you could add this and a dmesg log to the buzilla? It seems like other people should be seeing the same problem, so I'm hoping to grub around on the web to see if there are similar reports involving these devices. https://bugzilla.kernel.org/show_bug.cgi?id=209725 Here's one that is superficially similar: https://linux-hardware.org/index.php?probe=e5f24075e5&log=lspci_all in that it has a RP -- switch -- I211 path. Interestingly, the switch here advertises <64us L1 exit latency instead of the <32us latency your switch advertises. Of course, I can't tell if it's exactly the same switch. Bjorn