Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4901763rwb; Tue, 17 Jan 2023 06:58:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtbHU6q9WBs5+yflEGPK5g76PoMPp9+R+EJq3dsdXqhMWTrkTHRCcqYQRIlGF5Kw9ZalYAl X-Received: by 2002:a17:906:c418:b0:7c1:fbea:c5ce with SMTP id u24-20020a170906c41800b007c1fbeac5cemr15916628ejz.7.1673967506866; Tue, 17 Jan 2023 06:58:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673967506; cv=pass; d=google.com; s=arc-20160816; b=cPhacXxXj1B7mDy26mLYTIEeCeFcEr3vyHvLPmxGfZDYfN/OsmV5Cs3fBZgBzAyjuh X8Rz7nPd5+6n91GtS0zpObHL2jJTjYz5D31lvpdA5w6EWAnaIUty8E0wf6RhHn3kfM65 /zC+wYyqBDZ0D+ITpVGuh5MiTGykk5Vvj7GlCQrM+8xQR1O2KBRoQgfVh1s0T/HLoG9u NwUNx0e1lFcwCGfd0WqxRYOrTl1LqVZ8sJPKwhoKRHVDikwyrA+fl9/VvBLxM2h9XZBN 0UYrgl9u5Dol+G/DaaB+zg3SU+PHOSasjxR+6xWa/eXLHcV9K7F9uOVrEie1QLVsKue+ 2Pyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WjAj8Q3EASeThQ6TlFmpsEMRJGZAVMGiPmj8QaF3xFw=; b=fxYhBViJJFCWk3e3QsWcIZStJPrEab0fcq96sYirh3qgyy35H7acWPBh3sUsY6EL9E kBNrcbydol129AVzjG6q9hTxh0S8y5qQSfJ2cuS51HAiFfIhV4bf+w4WfVwqkX+OY22n tL6+BKkY3MqnYCQdj1KMENk8VeWKP/qt36/dWboJiVgVw9MRZf78ovs/TBJwe5QUn+it D/BbOUkhSpF4QlTfT0jVELNBzKFf++ZQAPH+Q/msOMmTlEpcjvfnUwVhTEeuPu7p+bBo HQkT6HN0cTJoE26GM/KZMHm5awbBn3AE/Zjk3m0Cr6/jsHJIDxwz9Zz4v1dyO3BRCzpA WdMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=bbHc3a6O; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp23-20020a1709073e1700b00870e0c1f5b6si7039552ejc.370.2023.01.17.06.58.14; Tue, 17 Jan 2023 06:58:26 -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=bbHc3a6O; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=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 S231468AbjAQOLc (ORCPT + 48 others); Tue, 17 Jan 2023 09:11:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjAQOLa (ORCPT ); Tue, 17 Jan 2023 09:11:30 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592E4303C5; Tue, 17 Jan 2023 06:11:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UdeAq2v5ufw/JCkpyvewvZ/DCiEy4JVziYzRMEn4WjPUMZGQNpYaQ3lsNAI+tXvS8USrQbACUP0teYec4aX3lmQ1fIwEKUGlmdLiH65HEjsOZn5BjVru4rRCjQlQz6CKPMB0ztmrD3zlug0quXSpBQ1nkZxTNulQ6H2FQcptnFf3eijFtoRyqb7ThywSFakELi0KBdz2KB2oWo959mfyrfidIueN4ErQRey+uSHPJLpT9bSHH8UO4QYhsNIOkHNdgyWIArfU3lNNQNaNu29kb7QN5RcGnF1mx95OnGxlLg4UncpnjCFIg0ggS+1obKILl7DaiRG6mZHnbv66BiAkRA== 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=WjAj8Q3EASeThQ6TlFmpsEMRJGZAVMGiPmj8QaF3xFw=; b=casMm+SEuUE4KXsmXPRLGI+TSEbIYBLcZ1S8bPXaNr2sqLVG7NtHAEQNl51YwrG6xHVWrwSA6P8giiMNehACyr9mPosSD1LuWPODIdO98xiFj8Lq3HouChaBS3qQH9h1uE2IpAjFFajMPjfqWRMQLZT9j5Ik3OGDX+dAtgDZf0+tqkGPfy4LQadbdwRcsRpIj6IRE98URhjqc1Km3LB4zMplO/SZeMOke8l9a8J3Nhi4XQIGeA9pwTDC1pY6BimilamFoW99hiYpt5nQpWCBtpketl2IoJKO90Uv7y9P5V78nRkwrRRBL/PY23uQzMvkftb+pVnZ3JeaJh9K/fxHlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=WjAj8Q3EASeThQ6TlFmpsEMRJGZAVMGiPmj8QaF3xFw=; b=bbHc3a6O3v7CrT+tjduhos2uick0rElCG/W+XxI+OdTaEnkHsr+TTVwJcozKTLoL2tbS4XevMbW+IowCKIacETyRqwXXL/fVqgImvHAlxkHEV9vszuBqizqDHd+9T+3+gADEsjSu6wTewkxT6SYF71hBS73Kkp4Ef/66hZeXXuY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB2504.namprd12.prod.outlook.com (2603:10b6:4:b5::19) by IA1PR12MB6577.namprd12.prod.outlook.com (2603:10b6:208:3a3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Tue, 17 Jan 2023 14:11:26 +0000 Received: from DM5PR12MB2504.namprd12.prod.outlook.com ([fe80::d17b:f929:12fd:8ae]) by DM5PR12MB2504.namprd12.prod.outlook.com ([fe80::d17b:f929:12fd:8ae%4]) with mapi id 15.20.6002.013; Tue, 17 Jan 2023 14:11:26 +0000 Date: Tue, 17 Jan 2023 22:11:00 +0800 From: Huang Rui To: "Yuan, Perry" Cc: "rafael.j.wysocki@intel.com" , "Limonciello, Mario" , "viresh.kumar@linaro.org" , "Sharma, Deepak" , "Fontenot, Nathan" , "Deucher, Alexander" , "Huang, Shimmer" , "Du, Xiaojian" , "Meng, Li (Jassmine)" , "Karny, Wyes" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v10 12/12] Documentation: amd-pstate: introduce new global sysfs attributes Message-ID: References: <20230106061420.95715-1-perry.yuan@amd.com> <20230106061420.95715-13-perry.yuan@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230106061420.95715-13-perry.yuan@amd.com> X-ClientProxiedBy: SI2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:4:197::8) To DM5PR12MB2504.namprd12.prod.outlook.com (2603:10b6:4:b5::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR12MB2504:EE_|IA1PR12MB6577:EE_ X-MS-Office365-Filtering-Correlation-Id: 9cb83c11-6522-47e3-1a4d-08daf894b85b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EjfG6CXeiv8LBHnx8O7xDF0fKMDTkVIsJmH50rDptuzi3+T/oei1InbB5NDB8vNiYQAtfpWtp3gjGlDaoDxCrdyG+jjwSp2ypEHSrThuCQuBFSMNowx5ikBBF1G71+sj1KP9QzY8Yv8nkj1OXdUIC/xtQCSNNkTpXMWHAVujmEJAyFoq4HMvUiVsjK3mDuOLoVtPKhGAXMOC4E17A16hl56bC2PoCQMD48kxT7gxoMmF9GFCkBh8d8zi+KU/g9sICfjR00l9jbcUD1KTewjWUscMrGvy8/I+klFVKYWxgbDDZTocZnMRHHdEaBlXMpRGjoIPj58s7Q2windZpga95NDB4alGkmwks1iSQoGBKHj3IUd5LGdBxQH7KVW8jg+Fqa558LHW6nBROq6yGI75xmBlV6x+H15vJNva4N1JgrE9R51exB+mRzlFI8/fc3/2IKbcXcO/jGt2BvXQ/JG5xDSIHckvDzQFG4KhhXw8CPApiTyP/tn9Qb4jDRYOG6VR6ZRgkPXJvtL4Mc91AwwI7jn+2IIK0mQZ6Q+kNnSNBQsOoKabGXPff78UaDSVqtAzpvNTKyX7YAQ90p0hlX6hViAN/YR2YX8WqYvaNZ/NUJMpODDO5f2M6tE++HrhAclVh6UsG49jnlbmBoYjH/Rwq9o9ylKTBal2ClpH5kMIApGnGUe/eKTL8GWr3lJGrSLP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB2504.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(376002)(396003)(346002)(366004)(451199015)(6636002)(54906003)(2616005)(186003)(26005)(4326008)(8676002)(66556008)(66476007)(6512007)(66946007)(478600001)(6862004)(41300700001)(8936002)(83380400001)(6666004)(2906002)(5660300002)(316002)(6506007)(38100700002)(6486002)(37006003)(86362001)(36756003)(67856001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?VBK24+QxddoBWPt8MI3/HFgQOHQmYryUXKXtPMT2sNm28JySaodU6GU2qHOq?= =?us-ascii?Q?kOrYF2veaaGIVjbWzJTDADZ3wptqBfGrUedOdzljUsiVI8QEgnBkyewKhexK?= =?us-ascii?Q?Ozaj4I6NG6K3J8OSatrxW8k5LkSkoU0NDjYuFrPNJ4wE60AAreMaDw6yfgqV?= =?us-ascii?Q?oU5crTQ6xV3Ud46CUVapz8n1pg0WU4tTuGa5mh16Yd9NHmTJlq0MW2+vTimI?= =?us-ascii?Q?EWWL32RVtEOEfsED9JRPsToo/Kd0+aNk18JkJ3cMUhfCUZ/gLaEDextIPIu0?= =?us-ascii?Q?9QvGsJEJe15BS5zdPMuTRbHF7YNdXOfBrOIobgU5jItVQiHK93kOydKps6Oy?= =?us-ascii?Q?kzPdIwmWnXH86TqN/fEW1SzWLanIH4WctaJS3bO6pD/zcF6KrdMmBdIJ8qPD?= =?us-ascii?Q?D4mRDDGk2GMoUKUub5+chC9py2256pviwAh7/XZTLytcu8ZQuXcJWQG9NxBu?= =?us-ascii?Q?kNg+en6Nbq0CGFhscTcn4d4IM8ZFhADd6pydIzWZQ2LJA0DFWhe3Mvo8uN6E?= =?us-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yb7fnU7qG8FCqxTy?= =?us-ascii?Q?I+ArxvOPuMPpc5hY/s0ijMKtOdIAnnI7gQnws7neL0bXr+2z/rNx5SZMlUwH?= =?us-ascii?Q?L/ZFOaWOQmCe1yVxLEXCBwTrVZnlHNSiVj4R5Cllh1CzVg+zF/BoXCV2RIY3?= =?us-ascii?Q?8VqR37wb47FQiG9SXnBfoXQzKjXA9IEbcIAluVWe?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9cb83c11-6522-47e3-1a4d-08daf894b85b X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2504.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2023 14:11:25.9891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Mqv9yJWIZiQxeOJ7LGFnrU08jpDNDzNm+mxwy1S73/OWFIRUUnTCI4NhJ2jHiYEp/ymkWCriijTSOZ2Vq2UJYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6577 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 06, 2023 at 02:14:20PM +0800, Yuan, Perry 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` > > Reviewed-by: Mario Limonciello > Signed-off-by: Perry Yuan Patch 9, 10, and 12 are Acked-by: Huang Rui > --- > 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..df0637a49f47 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 switch over > + to the operation mode represented by that string - or to be > + unregistered in the "disable" case. > + > ``cpupower`` tool support for ``amd-pstate`` > =============================================== > > -- > 2.34.1 >