From patchwork Mon Aug 19 02:59:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1973639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WnHPc0Ktjz1yYl for ; Mon, 19 Aug 2024 12:59:31 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sfsc0-0006Be-Eg; Mon, 19 Aug 2024 02:59:16 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sfsbz-0006BT-D6 for kernel-team@lists.ubuntu.com; Mon, 19 Aug 2024 02:59:15 +0000 Received: from hwang4-ThinkPad-T14s-Gen-2a.. (unknown [120.85.104.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id D16F24A8C2 for ; Mon, 19 Aug 2024 02:59:13 +0000 (UTC) From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][N/O/unstable][PATCH v2 0/2] Enable ASPM for nvme controller when working in RAID on mode Date: Mon, 19 Aug 2024 10:59:06 +0800 Message-Id: <20240819025908.50667-1-hui.wang@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2072679 In the v2: Thanks for Timo to point out, there is the same problem for lunar-generic and mantic-generic kernels, and we applied to similar UBUNTU SAUCE patches to those kernels, but somehow we forgot to apply the patches to unstable at that time, hence we have regression for this issue in N/O/..., the tracking bug for L/M is: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2034504 short-term plan: SRU the SAUCE patches to N/O/unstable, fix the regression on those Dell machines ASAP. long-term plan: Kai-heng will ping and discuss with linux-pci maintainers, modify the patch as maintainers request, once the formal patches are merged to upstream kernel, I will revert the SAUCE patches from N/O/unstable and SRU the formal patches to these kernels. [Impact] The NVME controller works in RAID on mode by default on some Dell machines, and in this case, the PCIE ASPM couldn't be enabled, and as a result the system idle can't enter deep idle states. This issue not only impacts ubuntu users but also impacts our Dell OEM projects. [Fix] pick 2 commits from linux-pci mailist [Test] After running the patched kernel, we could run 'sudo lspci -nnvv' and check "Non-Volatile memory controller": LnkCtl: ASPM L1 Enabled; And check idle states, we could see the system could enter deep idle: $ sudo cat /sys/kernel/debug/pmc_core/package_cstate_show Package C2 : 55740989 Package C3 : 4656373 Package C6 : 43325041 Package C7 : 6687655 Package C8 : 44948950 Package C9 : 1693 Package C10 : 92865596 [Where problems could occur] Because the patchset is not accepted by upstream yet, it is a bit risky to merge the patchset to ubuntu kernel. And the patch only impacts vmd driver, hence if there is regression, it could only be in the nvme driver with RAID on mode. The regression possibility is very low because we already tested the patch on many Dell, lenovo machines, there is no regression so far. Kai-Heng Feng (2): UBUNTU: SAUCE: PCI: ASPM: Allow OS to configure ASPM where BIOS is incapable of UBUNTU: SAUCE: PCI: vmd: Let OS control ASPM for devices under VMD domain drivers/pci/controller/vmd.c | 2 ++ drivers/pci/pcie/aspm.c | 8 ++++++-- include/linux/pci.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) Acked-by: Aaron Jauregui Acked-by: Kuan-Ying Lee