From patchwork Tue Nov 6 10:53:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 993583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MthaS4dz"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42q5xj3VnMz9sD4; Tue, 6 Nov 2018 21:53:29 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gJyz3-0001AL-TC; Tue, 06 Nov 2018 10:53:21 +0000 Received: from mail-pg1-f194.google.com ([209.85.215.194]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1gJyz2-0001AE-SO for kernel-team@lists.ubuntu.com; Tue, 06 Nov 2018 10:53:21 +0000 Received: by mail-pg1-f194.google.com with SMTP id q5-v6so5664715pgv.0 for ; Tue, 06 Nov 2018 02:53:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id; bh=9NtPxC6wjW3ArZBIp/poEEa1GQe/f7LWRaOwmJ5cOq0=; b=MthaS4dzaoiYouALrFowJpOg+HFuhp/EFNYnomPCy4Cryg3GpOIxuawpc9DEdOcG1F hH+QwZOZQINKNI2uZIAHQJ1ji9actaWjeqvyAYoaTSjSFM5C6GoW7i6rUPG7b2MFu0ha n9SV7AY4Rvl2PFFUcrqsZoLtmDcp41yLyG3NkyFSIoJE+3Fvp1SypWhI7ljcBo8ZWk05 hti8BKNQrKcIrHhYtUP+/QMq7HOIAJdef4c6OSpWRlUiI9Q04tBoA32etSvX41d+Xm4N CplE1n6KdleYxmYGiHtp0vd7zNcxVeIuYB0Ru9cil9gnDIAOohJaEEfGKi8ec3w97Dws xvMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=9NtPxC6wjW3ArZBIp/poEEa1GQe/f7LWRaOwmJ5cOq0=; b=mJPY9DCfu2leaF2hprZV8YmbcobQP4FsRZ8Z46pBzzQUWnlQlH96NAUiEboEGVPtav /MnqsL2MAfW/M5Xugz8wELEgTkwMsQ3yg/hp+J23M//7oC8oalTT+5alw86C8Bf11l2B ucI7rrf2ktwbk+7BIPflJ4b/mwG0eJXj80P4cFhvNfe8AYOzrYcR4A3sP6CJ92eYG7c7 rLsu4W0op8HAoso84FvFx/RZw7cgiNkLnQncktGuHW55vOx8B5Mnz6RyZkf8SaXlUtT5 iKuYyAXEvjrQ13pfUSeYMLh2oyHJ20HZQk4G1vlZwJIBTT97qQz4A7TB6tu0uvNrUV08 sOrA== X-Gm-Message-State: AGRZ1gJ/At7n1wN5qdAoSqx9RYFh7iwtIioObrIqxFuW+tlRAJqpteHH d7AQcBZvaRezZrhk8t6Cms2/o/zE X-Google-Smtp-Source: AJdET5e50P+I43tVbQwmK2U1l183vs1QHGXfK5XZC+s5AP6mOAYirXMfWeBVME7BIluTx7E2+K/0MA== X-Received: by 2002:a63:8c4:: with SMTP id 187-v6mr23416344pgi.396.1541501598725; Tue, 06 Nov 2018 02:53:18 -0800 (PST) Received: from localhost (114-32-69-186.HINET-IP.hinet.net. [114.32.69.186]) by smtp.gmail.com with ESMTPSA id a19-v6sm30564097pfi.138.2018.11.06.02.53.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Nov 2018 02:53:17 -0800 (PST) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix) Date: Tue, 6 Nov 2018 18:53:10 +0800 Message-Id: <20181106105314.30069-1-acelan.kao@canonical.com> X-Mailer: git-send-email 2.17.1 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: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1801875 [Impact] On some Dell XPS models, we observed the power consumption raises higher than long idle does during s2idle with sk hynix nvme. C2: Short idle: 4 Long idle: 1 S2I: 3.7 S5: 0.19 C3: Short idle: 7.2 Long idle: 4.5 S2I: 6.22 S5: 0.18 C5: Short idle: 6.5 Long idle: 1 S2I: 2.88 S5: 0.18 [Fix] From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own APST feature to do the power management. To leverage its APST feature during s2idle, we can't disable nvme device while suspending, too. So, here is what we did on the driver, 1. prevent nvme from entering D3, 2. prevent nvme from being disabled when suspending. [Test] Verified on different XPS machines with different sk hynix nvme disks, it fixes the power consumption issue with no regression. And the power consumption drops to 0.77W during s2idle. [Regression Potential] Low, the patches only applied to specific nvme module, and from our test, the system is still stable. [Misc] This issue should be fixed by the firmware, and we're pushing sk hynix to fix it. But before sk hynix find out how to solve it, we have to preserve these commits in our kernel for a while. BTW, the patches require pm_suspend_via_s2idle() function from below commit which is still under reviewing. https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html AceLan Kao (2): pci: prevent sk hynix nvme from entering D3 nvme: add quirk to not call disable function when suspending drivers/nvme/host/nvme.h | 5 +++++ drivers/nvme/host/pci.c | 8 +++++++- drivers/pci/quirks.c | 1 + include/linux/pci_ids.h | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) Acked-by: Kleber Sacilotto de Souza Acked-by: Stefan Bader