From patchwork Mon Feb 28 19:57:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: srinivas pandruvada X-Patchwork-Id: 12763748 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90E6FC433F5 for ; Mon, 28 Feb 2022 19:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbiB1T6o (ORCPT ); Mon, 28 Feb 2022 14:58:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiB1T6n (ORCPT ); Mon, 28 Feb 2022 14:58:43 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119332B25B; Mon, 28 Feb 2022 11:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646078284; x=1677614284; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Eq8opGJGt5MzXdQWOsKJ4rqn4lBVtburJGTPiuqvMOw=; b=d4ivrvQyGLYOyeJDzxx8utWHr2+epPRkPrtMw239BBh0KHcVEVvv7K5A vvL80QkgPaMKXFK/PQgHud33Ti1VZ19EdQzPe1D9ZroiNhLh9ZBppLRwL ndLuzcldeRB7jOJSFEYEnNlA/l8OoEJZmxMQDYveqAdH8u7UzDoxsuShz t7a/O8lSxrLpNTQEqEKq+2Ops1Q4q5iqFvn+HMPM2kc9Bnejkg1WPV2Jb C3m5jK7bsQrh1Lq8aQQuNgeCRG9NKIprVgG3YRMauj/k7WCHfSfcrcsH4 EfvkOX6X7Jth7G2NO9Xb7cW2lssxsyKR5Vs9ZDqWJcptCq8EZQLlnHzJa w==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="339406627" X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="339406627" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 11:58:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="685459498" Received: from spandruv-desk.jf.intel.com ([10.54.75.8]) by fmsmga001.fm.intel.com with ESMTP; 28 Feb 2022 11:58:02 -0800 From: Srinivas Pandruvada To: corbet@lwn.net, rafael@kernel.org, hdegoede@redhat.com, markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Srinivas Pandruvada Subject: [PATCH v2 1/2] Documentation: admin-guide: pm: Document uncore frequency scaling Date: Mon, 28 Feb 2022 11:57:59 -0800 Message-Id: <20220228195800.1422004-1-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Added documentation to configure uncore frequency limits in Intel Xeon processors. Signed-off-by: Srinivas Pandruvada --- v2 As suggested removed "===" (chapter) for Introduction and added two sections "Introduction" and "Sysfs interface". .../pm/intel_uncore_frequency_scaling.rst | 59 +++++++++++++++++++ .../admin-guide/pm/working-state.rst | 1 + 2 files changed, 60 insertions(+) create mode 100644 Documentation/admin-guide/pm/intel_uncore_frequency_scaling.rst diff --git a/Documentation/admin-guide/pm/intel_uncore_frequency_scaling.rst b/Documentation/admin-guide/pm/intel_uncore_frequency_scaling.rst new file mode 100644 index 000000000000..a55cf68d77df --- /dev/null +++ b/Documentation/admin-guide/pm/intel_uncore_frequency_scaling.rst @@ -0,0 +1,59 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: + +============================== +Intel Uncore Frequency Scaling +============================== + +:Copyright: |copy| 2022 Intel Corporation + +:Author: Srinivas Pandruvada + +Introduction +------------ + +Uncore can consume significant amount of power in Intel's Xeon servers based +on the workload characteristics. To optimize total power and improve overall +performance, SoC has an internal algorithm for scaling uncore frequency. These +algorithms monitor workload usage of uncore and set a desirable frequency. + +It is possible that users have different expectations of uncore performance and +want to have control over it. The objective is similar to set scaling min/max +frequencies using cpufreq sysfs to improve compute performance. Users may have +some latency sensitive workload where they do not want any change to uncore +frequency. Also, users may have workload which requires different core and +uncore performance at distinct phases and they want to use both cpufreq and +uncore scaling interface to distribute power and improve overall performance. + +Sysfs Interface +--------------- + +To control uncore frequency, a sysfs interface is provided in the directory: +`/sys/devices/system/cpu/intel_uncore_frequency/`. + +There is one directory for each package and die combination as the scope of +uncore scaling control is per die in multiple dies/package SoC or per +package for single die per package SoC. The name represents the +scope of control. For example: 'package_00_die_00' is for package id 0 and +die 0 in it. + +Each package_*_die_* contains following attributes: + +``initial_max_freq_khz`` + Out of reset, this attribute represent the maximum possible frequency. + This is a read only attribute. If users adjust max_freq_khz, + they can always go back to maximum using the value from this attribute. + +``initial_min_freq_khz`` + Out of reset, this attribute represent the minimum possible frequency. + This is a read only attribute. If users adjust min_freq_khz, + they can always go back to minimum using the value from this attribute. + +``max_freq_khz`` + This attribute is used to set the maximum uncore frequency. + +``min_freq_khz`` + This attribute is used to set the minimum uncore frequency. + +``current_freq_khz`` + This attribute is used to get the current uncore frequency. diff --git a/Documentation/admin-guide/pm/working-state.rst b/Documentation/admin-guide/pm/working-state.rst index 5d2757e2de65..ee45887811ff 100644 --- a/Documentation/admin-guide/pm/working-state.rst +++ b/Documentation/admin-guide/pm/working-state.rst @@ -15,3 +15,4 @@ Working-State Power Management cpufreq_drivers intel_epb intel-speed-select + intel_uncore_frequency_scaling From patchwork Mon Feb 28 19:58:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: srinivas pandruvada X-Patchwork-Id: 12763749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6022BC43217 for ; Mon, 28 Feb 2022 19:58:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbiB1T6p (ORCPT ); Mon, 28 Feb 2022 14:58:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbiB1T6n (ORCPT ); Mon, 28 Feb 2022 14:58:43 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE1E42E09F; Mon, 28 Feb 2022 11:58:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646078284; x=1677614284; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e74w0OEGEp4eOrov/OjcyDae/25MPuueAdebpU/hUcQ=; b=ekRJ1tF2gWP1QPvuPq1PyyGsV2P+Ptui/NaQ45NYzJ4k/tivbC5UpwjM /rWenSHjGZXMtGk/Uh4jJHPYwCf4r8F6wfzBxawNAi4PMMeRA2CkNBJsY vYHPig/L/MIr5P2dUIdaioBrQ1F0Q+JUV+mpQezml1oft9JUCWRQiZIkk /JeZpu5MUjWWaP6qUE6nWLXb8NTytlKU1vmMapgSHmEm4v+sAy1FK3hmE hTaCjEqSIQ2u9wSh4r3nWqviNQH0Sn5tdPr5t99zRlm7a4SQHOXo99RX0 i9atYcmfOXqIVeQL+0h1tHy5wNgGExNf11yVsL3wQrN442b4AGkkupI/f A==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="339406630" X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="339406630" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 11:58:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,144,1643702400"; d="scan'208";a="685459499" Received: from spandruv-desk.jf.intel.com ([10.54.75.8]) by fmsmga001.fm.intel.com with ESMTP; 28 Feb 2022 11:58:02 -0800 From: Srinivas Pandruvada To: corbet@lwn.net, rafael@kernel.org, hdegoede@redhat.com, markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Srinivas Pandruvada Subject: [PATCH v2 2/2] MAINTAINERS: Add additional file to uncore frequency control Date: Mon, 28 Feb 2022 11:58:00 -0800 Message-Id: <20220228195800.1422004-2-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220228195800.1422004-1-srinivas.pandruvada@linux.intel.com> References: <20220228195800.1422004-1-srinivas.pandruvada@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add additional Documentation file in the list of files. Signed-off-by: Srinivas Pandruvada --- New patch to add file to maintainers list. MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index dc4a1370ef1b..d36a51dee153 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9891,6 +9891,7 @@ INTEL UNCORE FREQUENCY CONTROL M: Srinivas Pandruvada L: platform-driver-x86@vger.kernel.org S: Maintained +F: Documentation/admin-guide/pm/intel_uncore_frequency_scaling.rst F: drivers/platform/x86/intel/uncore-frequency.c INTEL VENDOR SPECIFIC EXTENDED CAPABILITIES DRIVER