From patchwork Mon Nov 28 16:47:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 1709889 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=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=wM0aS1BT; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (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 4NLWcq26Gxz23nQ for ; Tue, 29 Nov 2022 03:48:27 +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 1ozhIn-0006nv-Kz; Mon, 28 Nov 2022 16:48:17 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ozhIb-0006YB-I4 for kernel-team@lists.ubuntu.com; Mon, 28 Nov 2022 16:48:05 +0000 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (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-internal-1.canonical.com (Postfix) with ESMTPS id 3EF213F0E9 for ; Mon, 28 Nov 2022 16:48:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1669654085; bh=LonQPqpFTthbvTcgSn7Wq2MmpQbagkMIWI6xh7ssTiA=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=wM0aS1BTwWmpmX/2NTEKymxaZA/g3AWgztpvnZSND4hReFcMVs8MXQON7S3Gc8ccv aGlX3lgJnS8FbFtB5QSUci2KPBRg5YhorY3RCUBV4CiZRoC9O0LHHcrkBRCO6NjFVh Bj3SRwwv7sgDd3AMgJz7nrzk6P/zyhOunZYOrh+A4Zc6zgaQ5/Cxao8aXCejfsIeGX KcZHhXVYUZGOiXg9UxSt63fOzAhnvd7uVm43FhsERlX7ri7/P2GqLceVbHSdEb1eWA xeHQ9KFRkT95Yvm+02ifn5pjMLE1NkjcaGAH5U0sLWvxe6xsQurHciSG6A7lCnz0H+ ahwah41+EsSsw== Received: by mail-wr1-f72.google.com with SMTP id r17-20020adfb1d1000000b002421ae7fd46so767101wra.10 for ; Mon, 28 Nov 2022 08:48:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LonQPqpFTthbvTcgSn7Wq2MmpQbagkMIWI6xh7ssTiA=; b=VhaugeoPxTT/+N8ZtEOASGgF3W3FsivRAyhzwBwN1tMaT1SqpFFg8Kn34cHsvEoz7a FqB2ctbyucN2YobTMgvUYdvqqnhiUEOmzmc5G86wFuorh5X0+SA7Hq82PyyYZnhp71bm 1VeZ7Rpz0xODrx1u4zrRk2Fs5chCK9LjRCPcscIYe7Q4zzJlhmYdt2ScSwlcyPmN7jTA 9xaOTkwYBtuEo+WIoWiJNNiAtAiWcsb1ie4L9WqbQrDWr3RXh4OUPRK8DWPFTqxh8vk8 30xqlFKhdXeWDCpaXp3dPq5bCpJxILeYEUc0wZgPFRkRkn65FhlHn+0TYPaxEKE7drd9 bNYQ== X-Gm-Message-State: ANoB5pneoURR4ynJt/ENgZZZ7wL8Cf3rss3Tm6AYaw0tAvf0bUhKT2oz 9AqhcPfQceGqhLIQCJ8+YOhoNADZWuflZ63dH4pAGL1J9FSfB45261EjQ0eR/DDW/3L7d1XugEe 4AVauVd89VDULueJ5oGp4KfqcIbbTy54BlBjbKt8H1w== X-Received: by 2002:a1c:f006:0:b0:3cf:ecd8:330d with SMTP id a6-20020a1cf006000000b003cfecd8330dmr28158451wmb.130.1669654084681; Mon, 28 Nov 2022 08:48:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Hz+mBYeFNdtImWjkasrGcBNd2kXxfvnu1upoAUohrtDM0iqSUSPetzK488T/d5rNRFkGNTg== X-Received: by 2002:a1c:f006:0:b0:3cf:ecd8:330d with SMTP id a6-20020a1cf006000000b003cfecd8330dmr28158440wmb.130.1669654084402; Mon, 28 Nov 2022 08:48:04 -0800 (PST) Received: from canonical.com (net-93-65-52-3.cust.vodafonedsl.it. [93.65.52.3]) by smtp.gmail.com with ESMTPSA id b17-20020a5d4b91000000b0024207478de3sm8791293wrt.93.2022.11.28.08.48.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 08:48:04 -0800 (PST) From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH 7/8] Documentation: amd-pstate: add driver working mode introduction Date: Mon, 28 Nov 2022 17:47:54 +0100 Message-Id: <20221128164755.368178-8-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221128164755.368178-1-paolo.pisati@canonical.com> References: <20221128164755.368178-1-paolo.pisati@canonical.com> 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" From: Perry Yuan BugLink: https://bugs.launchpad.net/bugs/1998106 Introduce the `amd_pstate` driver new working mode with `amd_pstate=passive` added to kernel command line. If there is no passive mode enabled by user, amd_pstate driver will be disabled by default for now. Acked-by: Huang Rui Reviewed-by: Gautham R. Shenoy Tested-by: Wyes Karny Signed-off-by: Perry Yuan Signed-off-by: Rafael J. Wysocki (cherry picked from commit 8a2cbf72a43ade1ed00760f65914e322599fe662) Signed-off-by: Paolo Pisati --- Documentation/admin-guide/pm/amd-pstate.rst | 30 +++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index 8f3d30c5a0d8..06e23538f79c 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -283,23 +283,19 @@ efficiency frequency management method on AMD processors. Kernel Module Options for ``amd-pstate`` ========================================= -.. _shared_mem: - -``shared_mem`` -Use a module param (shared_mem) to enable related processors manually with -**amd_pstate.shared_mem=1**. -Due to the performance issue on the processors with `Shared Memory Support -`_, we disable it presently and will re-enable this by default -once we address performance issue with this solution. - -To check whether the current processor is using `Full MSR Support `_ -or `Shared Memory Support `_ : :: - - ray@hr-test1:~$ lscpu | grep cppc - Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm - -If the CPU flags have ``cppc``, then this processor supports `Full MSR Support -`_. Otherwise, it supports `Shared Memory Support `_. +Passive Mode +------------ + +``amd_pstate=passive`` + +It will be enabled if the ``amd_pstate=passive`` is passed to the kernel in the command line. +In this mode, ``amd_pstate`` driver software specifies a desired QoS target in the CPPC +performance scale as a relative number. This can be expressed as percentage of nominal +performance (infrastructure max). Below the nominal sustained performance level, +desired performance expresses the average performance level of the processor subject +to the Performance Reduction Tolerance register. Above the nominal performance level, +processor must provide at least nominal performance requested and go higher if current +operating conditions allow. ``cpupower`` tool support for ``amd-pstate``