From patchwork Tue Oct 25 06:18:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rui Li X-Patchwork-Id: 10514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp838859wru; Mon, 24 Oct 2022 23:30:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5V1eRUc435q2uQc+/VUm7kA1xbpL57LUvoF4u6yY/mCVYWAC98fz3PqqZ/VjCFL+kFQ4Aw X-Received: by 2002:a05:6a00:e1b:b0:537:7c74:c405 with SMTP id bq27-20020a056a000e1b00b005377c74c405mr37388391pfb.43.1666679412545; Mon, 24 Oct 2022 23:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666679412; cv=none; d=google.com; s=arc-20160816; b=qVjnpwD7HkjprlOahaWg2CMiyNeFZmXSDhEZeHB9o3rIuRuISZ6F2ImtzZRwVkYUBH gLIv/e5NyddLyhhi2oPVw4qAaSadZQxz5JcyO7yklE/FKGMKUj2K/cRMT4TXBpnow3Pf UQVtdNvD/MG51Dwm3d+59Z6Uzigo8a7ryTvdCMaKpWuSSiUPJbEulkopbnnEzMW9CzMv DnVndKQFzp/I8kBzOqbQpIiM+DwpJf5RZXGB7UVxIxQrnCXNykwg2GtffPREKA3Iiu+K ECXJLj/72nvJTtdx97xjWxLlRyf4dz7yQqWNWGMWr/5n3Zida68SDv3cTD8TFNI3Vfga R4Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PfHEfbX+rpdt9GZNuVQDrplmUUgJamTim3fW50Ttv3M=; b=XIErcVJ4Ug2fFCOvYRuWoIO+9U/a+JTmsSxnY/JICNLeQe4Hy7010hSI6q+FOiTGYF O63GAw2J67bt+3IR5Ss29eBGLD5zBLSEYKyhAmBEiKHZgeNm4qG5hmgKbWrsAlId4fS/ Xvk6AqAQ3wSWhJss34m4nqC2vanHg7uBU2CSOtkac0rUrycZmcDlFj+ukMzpTGsrUyCq JT//5NKXl35sqiASA53XKUDdROoDyBYRegPLF8HpBnjmFkgU3qQB4X3XlLXm2KWr06KS UmrtqJvUpdMMtjrJHYofved5lPowHLH1jH5jKU87amDF02lgD95JIvrttShG3WHbw5nB aVYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lirui.org header.s=key1 header.b=kgYJ+qw6; 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=lirui.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902f70800b00186881688f9si1906715plo.276.2022.10.24.23.29.58; Mon, 24 Oct 2022 23:30:12 -0700 (PDT) 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=@lirui.org header.s=key1 header.b=kgYJ+qw6; 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=lirui.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbiJYGSV (ORCPT + 99 others); Tue, 25 Oct 2022 02:18:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbiJYGSR (ORCPT ); Tue, 25 Oct 2022 02:18:17 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D96A43179; Mon, 24 Oct 2022 23:18:15 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lirui.org; s=key1; t=1666678694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PfHEfbX+rpdt9GZNuVQDrplmUUgJamTim3fW50Ttv3M=; b=kgYJ+qw6Qz3M1VxF16vT1IgrIpJW6lcr34V3/QpN4VMQynlbDeoklvXGY9TZ18uLd8qotL wGTESYjDN0ayReISW5OxuiRvQNUpat/ayMW3lJyQiiBbLOxOWszmzls9XRTTcbamXfoZi6 Vw6Xwioq9RMzOtVU8yYwm3sufZMN0fNCgBQGnWwpNpflKtACN+/4gZ32DSBZwjKjYNBzsA 1DSFfuAx2JmbUds5fv6GWn3TfBBz8uzp5BRXfwrdZ1xDsTlD74AsSIQPEP053WLM2U2NlU Pd2jlwtBb3hVMrEWB0aSpHCTM/ZGc23PkSad11QDeAv68r8w9x8EzboifNucIA== From: Rui Li To: Alex Shi , Yanteng Si Cc: Jonathan Corbet , Wu XiangCheng , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Rui Li Subject: [PATCH] docs/zh_CN: Add userspace-api/sysfs-platform_profile Chinese translation Date: Tue, 25 Oct 2022 14:18:04 +0800 Message-Id: <20221025061804.35801-1-me@lirui.org> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747640031543089888?= X-GMAIL-MSGID: =?utf-8?q?1747640031543089888?= Translate the following documents into Chinese: - userspace-api/sysfs-platform_profile.rst Signed-off-by: Rui Li --- .../zh_CN/userspace-api/index.rst | 2 +- .../userspace-api/sysfs-platform_profile.rst | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Documentation/translations/zh_CN/userspace-api/sysfs-platform_profile.rst diff --git a/Documentation/translations/zh_CN/userspace-api/index.rst b/Documentation/translations/zh_CN/userspace-api/index.rst index 6a7e82ac16b9..0f3483a46fa2 100644 --- a/Documentation/translations/zh_CN/userspace-api/index.rst +++ b/Documentation/translations/zh_CN/userspace-api/index.rst @@ -26,6 +26,7 @@ Linux 内核用户空间API指南 ebpf/index no_new_privs + sysfs-platform_profile TODOList: @@ -38,7 +39,6 @@ TODOList: * iommu * media/index * netlink/index -* sysfs-platform_profile * vduse * futex2 diff --git a/Documentation/translations/zh_CN/userspace-api/sysfs-platform_profile.rst b/Documentation/translations/zh_CN/userspace-api/sysfs-platform_profile.rst new file mode 100644 index 000000000000..6e861f911424 --- /dev/null +++ b/Documentation/translations/zh_CN/userspace-api/sysfs-platform_profile.rst @@ -0,0 +1,40 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: ../disclaimer-zh_CN.rst + +:Original: Documentation/userspace-api/sysfs-platform_profile.rst + +:翻译: + + 李睿 Rui Li + +========================================================== +平台配置文件选择(如 /sys/firmware/acpi/platform_profile) +========================================================== + +现代系统中平台性能、温度、风扇和其他硬件相关的特性通常是可以动态配置的。平台 +配置通常会根据当前的状态由一些自动机制(很可能存在于内核之外)来自动调整。 + +这些平台自动调整机制通常能够被配置成多个平台配置文件中的一个,要么偏向低功率 +工作,要么偏向性能。 + +platform_profile属性的目的是提供一个通用的sysfs API来选择这些平台自动配置 +机制的配置文件。 + +需要注意的是,这个API只能用作选择平台配置文件。其目的并不是为了监测改变所致 +的性能特征。监测性能最好使用设备/供应商提供的工具,比如turbostat。 + +具体来说,当选择高性能配置文件时,真实能达到的性能可能受制于多种因素,比如: +其他组件的发热,房间温度,笔记本底部的自由空气流动等。这个API的目的明显不是让 +用户空间知道任何阻碍达到要求性能等级的欠佳条件。 + +由于数字本身并不能代表一个配置文件会调整的多个变量(功耗,发热等),这个API使 +用字符串来描述多种配置文件。为了保证用户空间能够获得一致的体验, +sysfs-platform_profile ABI 文档定义了一个固定的配置文件名集合。驱动程序 +*必须* 将它们内置的配置文件表示映射到这个固定的集合中。 + +如果映射时没有很好的匹配,可以添加一个新的配置文件名称。驱动希望引入的新配置文 +件名称时必须: + + 1. 解释为什么无法使用已有的配置文件名称。 + 2. 添加一个新的配置文件名称,以及预期行为的清晰描述,保存到 + sysfs-platform_profile ABI文档中。