Message ID | 20221225163442.2205660-14-perry.yuan@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp576531wrt; Sun, 25 Dec 2022 08:38:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXuk5/E0XifABnynuL/TuF16ZwuofWOwxQh/oxuGDHzc2S/Eh3Wyqely0hQpXQJFxv+4OEsy X-Received: by 2002:a17:902:ead5:b0:191:1b:68e0 with SMTP id p21-20020a170902ead500b00191001b68e0mr20768206pld.36.1671986285701; Sun, 25 Dec 2022 08:38:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671986285; cv=pass; d=google.com; s=arc-20160816; b=u8w5sEQwaO+xKlLpf7e1CiyXZrPTaKiG8PkHInIvWdI4GUEO2n0zQpvwR0pANDRPp1 TQYke7P6hdbzEzoji2cNn158o6ciLqsfDgbSAJqfIJP6LlAfSnsHRIR4jWaifenjj+8J ceCDlIeL80N2tKNTx7cOZbi9SCEROrVmu7akc4XczNc7VPie/YMlt0YrAy7KtpEzaabi cQbVHB8kC+PtlhTEFz18/Jb3edUNBEmJAiMjTt8m2BQrtPutwEZeJURPW3JWX1+An8JP to4laDoNJa0q0RPQ8y8tTKkA+nNlFwgtnXiHIPo7nfYMANA6edmrHRao2Eibkfl0srY4 wcWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4vh5BIiGu8aWs7ta5xjjRUVc33Mldl/eriqxGSSrR6c=; b=UNdKHcgTOpo4u7/qYqdUshGkwRNLKlxD+LYLkWF6d6QcOkGo4dBbKUC7HrzsH/TFif 4Git6uhB3zZZwB/ditYSc+j6kMmj+7j0ZbPJswDEipRjdyd/NBcU32v8keNOxLVSnvHf VqIQIBxenYkrp3OnxiChFwvt1r23odZ67QqPs6y8oLGgZ4+qH2uGsbQkKSbiOzRLVLlv tvtCMY6rTl96XnjilKx3Icyh5PKL1rL2lXvrmV1bJg6k9hiy0w/1juRkn0lWM6ScygaS fVB57372DytmeObQILfH1SshFuqG/rv4ICmzFAmOSjjy5FFIipjqf+BWUGCl3e1vMONU K3BQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=F3e4Uiz+; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170902b28900b00186a8bd137fsi8769968plr.453.2022.12.25.08.37.53; Sun, 25 Dec 2022 08:38:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=F3e4Uiz+; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbiLYQhG (ORCPT <rfc822;eddaouddi.ayoub@gmail.com> + 99 others); Sun, 25 Dec 2022 11:37:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231397AbiLYQgY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 25 Dec 2022 11:36:24 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2083.outbound.protection.outlook.com [40.107.237.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DDF2264C; Sun, 25 Dec 2022 08:35:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UPUydaXqFMs5YJk0gkbiyD2xyIKfp9ZbgMzGQvf/4adZNdyF2j9OCz5sCGAWDe+/L1ZzaAMpUbAOJ9ZI11go22FCi76cDWnU4sqD0OhbHjE8V4SqGA71A3nIiSOxPDNk1V/lFYO/Ny2G5mw2cXeLg9Mgm2OARvmSfS36ACj2Yg/Njm77xpXE1Q7EKYN671wd/7uZtfFXY1/38E4xktzPtvytDUgeO5I9DTNdR4wI7GYj5wZFYTQK5VNzaPrNBexTo1YqbPgJQ3Kkafm78Jue3kQOL2kJet45OuFHfnbbBSiJMp9RpLtEgHwkakcg8tZublPd9kf+hJiKTZUAHQGT0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4vh5BIiGu8aWs7ta5xjjRUVc33Mldl/eriqxGSSrR6c=; b=ae+z2lXJXaClxQB8GvOSZRYZiOYRyNc1fh/ekr0gfNPfGaW5gGJKtrDCY28T2z/NT6052FXw/1PzHsF4MoHtMU0dZRIDOlidza6ibLaRsvG1j5+t3BZ/HMs+TMiOka1uvLF2x6SvQmDlKeW0H+l8kDfsaM3pUF1ZcKLcBJvY93Huom4rYxi50ZTx2KDmPAKHysCXa+7OKtrGj4CBYOAxHaMX7OA2vA5A2qFd3DGPfdNBPDWbzwDPen9n3gNNauBT677EvoO0ZmUtGaEiqjct87zo7dR0LLYRo7fxh/6PQosXvajSCcOehEjJ6bBYExme5tLq+1isriHjSeXMpmwmoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4vh5BIiGu8aWs7ta5xjjRUVc33Mldl/eriqxGSSrR6c=; b=F3e4Uiz+pP3/13rwnhVPGrOxTkVlPcO6yfDInxSIHn6+x3tFNEW3GleFTMwAROQACbCefdbWPvBEeLh8py42WW9saukjgAHC2MaH8vWz8M9sXn8n8n7B7sLNYTXnailZRzGvLaRVEuutTrookhfIn/Os3w5AFi7k6Ny2V5ywJ70= Received: from MW4PR03CA0338.namprd03.prod.outlook.com (2603:10b6:303:dc::13) by SA1PR12MB5614.namprd12.prod.outlook.com (2603:10b6:806:228::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.12; Sun, 25 Dec 2022 16:35:48 +0000 Received: from CO1NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dc:cafe::d5) by MW4PR03CA0338.outlook.office365.com (2603:10b6:303:dc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.16 via Frontend Transport; Sun, 25 Dec 2022 16:35:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT050.mail.protection.outlook.com (10.13.174.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5944.14 via Frontend Transport; Sun, 25 Dec 2022 16:35:47 +0000 Received: from pyuan-Cloudripper.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sun, 25 Dec 2022 10:35:40 -0600 From: Perry Yuan <perry.yuan@amd.com> To: <rafael.j.wysocki@intel.com>, <Mario.Limonciello@amd.com>, <ray.huang@amd.com>, <viresh.kumar@linaro.org> CC: <Deepak.Sharma@amd.com>, <Nathan.Fontenot@amd.com>, <Alexander.Deucher@amd.com>, <Shimmer.Huang@amd.com>, <Xiaojian.Du@amd.com>, <Li.Meng@amd.com>, <wyes.karny@amd.com>, <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v9 13/13] Documentation: amd-pstate: introduce new global sysfs attributes Date: Mon, 26 Dec 2022 00:34:42 +0800 Message-ID: <20221225163442.2205660-14-perry.yuan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221225163442.2205660-1-perry.yuan@amd.com> References: <20221225163442.2205660-1-perry.yuan@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT050:EE_|SA1PR12MB5614:EE_ X-MS-Office365-Filtering-Correlation-Id: c0915225-55da-48d1-b3ff-08dae696139b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qCRWvtrMf61b7tzE10NjAZi+IYgUHIKcXwJ5m8Rl0WaoH32qi4hSdPTNteyN91csVVDCMQRc+EdUCs9g0/d14q3SW61/42AU8Cbi9/hgws+76TDm/mUlMhU4S6Ggr8zZ/CzJWzYSLcQPxjNI5uNtFO2eTfICjeGYq6fGSTFXhzXpBdhQaQZYyd1Q9MW5g5V3Oq5LqSdGAi8YKUGjEacmaSe9um6/adn9jNW76Q6x0ZKV5wH9IJS13xDN4VIywRUxLDr4c34lVUHY53jm9UY5c4tc2DFViSTnsB9eAbizp03p9XExYwg7waHUx3hbII3UAUXwU6bfiO+HxDW5ZsKxPLx03KtHsAKXy4AHc8uSw2y1pDQXNq/NrBgZDpHpOYJYFLIVTn3g++VRZ5vSlx4tg5GNBVUANBl6Tq8Dl/Xj9R3JgpGG1jq6w20Tx34eEsCVBiYpZ1YoBdcNnJenP6ycogyQiZ18yARXnkbWQOkIOnb1ydVlM9tOkvItlvi5cjVNPLVC4Izsu2ZvKNaIdvDTYlIPPxBegc+KInUIEjiuzGtJbjdz4pubvrhDnd79ixz5V7vbuu8KD0U4CI3aTIafWNKB+AH/nD43t8WgSqoluAsNTpXlK8DWmP3Xr6oaExlSt+TEnkRCFKXP/3ZehyNnvQyaRLdjJSYE9EKKknb7fLbLn3ZEdkOd0xydTIEn4hE6JprfO2eACfVGGdowDcdvuFYJIA1nSGg5aSbL6eNWq0Y= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(376002)(396003)(136003)(346002)(451199015)(46966006)(40470700004)(36840700001)(2616005)(316002)(1076003)(40480700001)(47076005)(426003)(44832011)(336012)(83380400001)(5660300002)(356005)(2906002)(82740400003)(16526019)(8936002)(40460700003)(478600001)(54906003)(82310400005)(26005)(186003)(8676002)(70206006)(70586007)(41300700001)(81166007)(110136005)(36860700001)(86362001)(4326008)(36756003)(7696005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2022 16:35:47.3082 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0915225-55da-48d1-b3ff-08dae696139b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5614 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753204691568459063?= X-GMAIL-MSGID: =?utf-8?q?1753204691568459063?= |
Series |
Implement AMD Pstate EPP Driver
|
|
Commit Message
Yuan, Perry
Dec. 25, 2022, 4:34 p.m. UTC
The amd-pstate driver supports switching working modes at runtime.
Users can view and change modes by interacting with the "status" sysfs
attribute.
1) check driver mode:
$ cat /sys/devices/system/cpu/amd-pstate/status
2) switch mode:
`# echo "passive" | sudo tee /sys/devices/system/cpu/amd-pstate/status`
or
`# echo "active" | sudo tee /sys/devices/system/cpu/amd-pstate/status`
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
---
Documentation/admin-guide/pm/amd-pstate.rst | 29 +++++++++++++++++++++
1 file changed, 29 insertions(+)
Comments
On 12/25/2022 10:34, Perry Yuan wrote: > The amd-pstate driver supports switching working modes at runtime. > Users can view and change modes by interacting with the "status" sysfs > attribute. > > 1) check driver mode: > $ cat /sys/devices/system/cpu/amd-pstate/status > > 2) switch mode: > `# echo "passive" | sudo tee /sys/devices/system/cpu/amd-pstate/status` > or > `# echo "active" | sudo tee /sys/devices/system/cpu/amd-pstate/status` > > Signed-off-by: Perry Yuan <perry.yuan@amd.com> > --- > Documentation/admin-guide/pm/amd-pstate.rst | 29 +++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst > index 62744dae3c5f..5f6379475b32 100644 > --- a/Documentation/admin-guide/pm/amd-pstate.rst > +++ b/Documentation/admin-guide/pm/amd-pstate.rst > @@ -339,6 +339,35 @@ processor must provide at least nominal performance requested and go higher if c > operating conditions allow. > > > +User Space Interface in ``sysfs`` > +================================= > + > +Global Attributes > +----------------- > + > +``amd-pstate`` exposes several global attributes (files) in ``sysfs`` to > +control its functionality at the system level. They are located in the > +``/sys/devices/system/cpu/amd-pstate/`` directory and affect all CPUs. > + > +``status`` > + Operation mode of the driver: "active", "passive" or "disable". > + > + "active" > + The driver is functional and in the ``active mode`` > + > + "passive" > + The driver is functional and in the ``passive mode`` > + > + "disable" > + The driver is unregistered and not functional now. > + > + This attribute can be written to in order to change the driver's > + operation mode or to unregister it. The string written to it must be > + one of the possible values of it and, if successful, writing one of > + these values to the sysfs file will cause the driver to cause the driver "will cause the driver to cause the driver to"? Presumably you mean just "will cause the driver to" With that fixed: Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> > + to switch over to the operation mode represented by that string - or to be > + unregistered in the "disable" case. > + > ``cpupower`` tool support for ``amd-pstate`` > =============================================== >
[AMD Official Use Only - General] Hi Mario. > -----Original Message----- > From: Limonciello, Mario <Mario.Limonciello@amd.com> > Sent: Wednesday, January 4, 2023 8:35 AM > To: Yuan, Perry <Perry.Yuan@amd.com>; rafael.j.wysocki@intel.com; Huang, > Ray <Ray.Huang@amd.com>; viresh.kumar@linaro.org > Cc: Sharma, Deepak <Deepak.Sharma@amd.com>; Fontenot, Nathan > <Nathan.Fontenot@amd.com>; Deucher, Alexander > <Alexander.Deucher@amd.com>; Huang, Shimmer > <Shimmer.Huang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Meng, > Li (Jassmine) <Li.Meng@amd.com>; Karny, Wyes <Wyes.Karny@amd.com>; > linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v9 13/13] Documentation: amd-pstate: introduce new > global sysfs attributes > > On 12/25/2022 10:34, Perry Yuan wrote: > > The amd-pstate driver supports switching working modes at runtime. > > Users can view and change modes by interacting with the "status" sysfs > > attribute. > > > > 1) check driver mode: > > $ cat /sys/devices/system/cpu/amd-pstate/status > > > > 2) switch mode: > > `# echo "passive" | sudo tee > > /sys/devices/system/cpu/amd-pstate/status` > > or > > `# echo "active" | sudo tee /sys/devices/system/cpu/amd-pstate/status` > > > > Signed-off-by: Perry Yuan <perry.yuan@amd.com> > > --- > > Documentation/admin-guide/pm/amd-pstate.rst | 29 > +++++++++++++++++++++ > > 1 file changed, 29 insertions(+) > > > > diff --git a/Documentation/admin-guide/pm/amd-pstate.rst > > b/Documentation/admin-guide/pm/amd-pstate.rst > > index 62744dae3c5f..5f6379475b32 100644 > > --- a/Documentation/admin-guide/pm/amd-pstate.rst > > +++ b/Documentation/admin-guide/pm/amd-pstate.rst > > @@ -339,6 +339,35 @@ processor must provide at least nominal > performance requested and go higher if c > > operating conditions allow. > > > > > > +User Space Interface in ``sysfs`` > > +================================= > > + > > +Global Attributes > > +----------------- > > + > > +``amd-pstate`` exposes several global attributes (files) in ``sysfs`` > > +to control its functionality at the system level. They are located > > +in the ``/sys/devices/system/cpu/amd-pstate/`` directory and affect all > CPUs. > > + > > +``status`` > > + Operation mode of the driver: "active", "passive" or "disable". > > + > > + "active" > > + The driver is functional and in the ``active mode`` > > + > > + "passive" > > + The driver is functional and in the ``passive mode`` > > + > > + "disable" > > + The driver is unregistered and not functional now. > > + > > + This attribute can be written to in order to change the driver's > > + operation mode or to unregister it. The string written to it must be > > + one of the possible values of it and, if successful, writing one of > > + these values to the sysfs file will cause the driver to cause > > + the driver > > "will cause the driver to cause the driver to"? > > Presumably you mean just "will cause the driver to" > > With that fixed: > > Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Thanks for the review, will fix the words and pick up the RB tag in v10. Perry. > > > + to switch over to the operation mode represented by that string - or > to be > > + unregistered in the "disable" case. > > + > > ``cpupower`` tool support for ``amd-pstate`` > > =============================================== > >
diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index 62744dae3c5f..5f6379475b32 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -339,6 +339,35 @@ processor must provide at least nominal performance requested and go higher if c operating conditions allow. +User Space Interface in ``sysfs`` +================================= + +Global Attributes +----------------- + +``amd-pstate`` exposes several global attributes (files) in ``sysfs`` to +control its functionality at the system level. They are located in the +``/sys/devices/system/cpu/amd-pstate/`` directory and affect all CPUs. + +``status`` + Operation mode of the driver: "active", "passive" or "disable". + + "active" + The driver is functional and in the ``active mode`` + + "passive" + The driver is functional and in the ``passive mode`` + + "disable" + The driver is unregistered and not functional now. + + This attribute can be written to in order to change the driver's + operation mode or to unregister it. The string written to it must be + one of the possible values of it and, if successful, writing one of + these values to the sysfs file will cause the driver to cause the driver + to switch over to the operation mode represented by that string - or to be + unregistered in the "disable" case. + ``cpupower`` tool support for ``amd-pstate`` ===============================================