Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4347944ybz; Tue, 28 Apr 2020 09:46:07 -0700 (PDT) X-Google-Smtp-Source: APiQypK66JsmaJmLgHgF6Mf7ZHT/i27qHWE1PG0Segrlv6g6sZp56/Jgn8PWsrYxzORDN7kg2rnV X-Received: by 2002:a17:906:7f0c:: with SMTP id d12mr24892073ejr.40.1588092367023; Tue, 28 Apr 2020 09:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588092367; cv=none; d=google.com; s=arc-20160816; b=gBvUmkz9c6Uj1zYqsL9x3xAEMrkZEJg7PTeKdjGFLPwnAYyUgucnou1dclrdn4RA5O DZ1NIBZwi0LNM0KpxWaauPlAyb1p65qbKsXGJqEEP15ffATBkltCQ6ThIym6NpG1Ons+ eG+ycqDy1UnAFodll142aFzJCXtRjfUH0I4AzsQmSy8KQ2BLHZIZohiVX3VnajNWlZxS JxOvkn1skclO/y7nPdeRYcAVHU6oIXlHxD20g/gPyAGJXiSexIxJ6yM9lN7YLtQFqJdP 8MqbaG3ar4S7NRtwJ4Fd7+C7sX1XcKr9nhatxEccLjHW1YB4Fa0W0sO2Wh0ght/YX8fj u2lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=JK4RE4BMZTVBL1pQwXEGPEA7pifbjv4R4+sgxGjJyEQ=; b=ShfTsvQ0FHw72upE7gfJH++yokioo/NmgayVK3uvH8fb1Mhuf9D/P2LCfO0qQcsBlv SXjXBGz3K0ThAD3DH6YSs3+c6xmnSxErUGfKIQxbce1omtxqgSRAu1AzsWqLJ0EVmsOQ en3aJCNjqFFjRMDrdfHPYgxwSok58ZClZNNgxiSeEB73dgiAo3oqiyhWsn9/tqytijlM QRw8JetmA8gAt7sJUIFGpMF2N2nXvuyEI0JOvohF9yEk0NmeVgbga3Zj2tBzIIVtKwfM DQpl+1+TwJCcJxyOrai8iTkj8qdo3ruTHYNvVsG4dI2XcLJKxi7z7Lt+HKkzs3rB6X6+ 4ZUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l61si1892747ede.343.2020.04.28.09.45.41; Tue, 28 Apr 2020 09:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728443AbgD1QmH (ORCPT + 99 others); Tue, 28 Apr 2020 12:42:07 -0400 Received: from foss.arm.com ([217.140.110.172]:55340 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728388AbgD1QmE (ORCPT ); Tue, 28 Apr 2020 12:42:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F311CC14; Tue, 28 Apr 2020 09:42:02 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8E3B23F305; Tue, 28 Apr 2020 09:42:00 -0700 (PDT) From: Qais Yousef To: Peter Zijlstra , Ingo Molnar Cc: Qais Yousef , Jonathan Corbet , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Luis Chamberlain , Kees Cook , Iurii Zaikin , Quentin Perret , Valentin Schneider , Patrick Bellasi , Pavan Kondeti , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v3 2/2] Documentation/sysctl: Document uclamp sysctl knobs Date: Tue, 28 Apr 2020 17:41:34 +0100 Message-Id: <20200428164134.5588-2-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200428164134.5588-1-qais.yousef@arm.com> References: <20200428164134.5588-1-qais.yousef@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Uclamp exposes 3 sysctl knobs: * sched_util_clamp_min * sched_util_clamp_max * sched_util_clamp_min_rt_default Document them in sysctl/kernel.rst. Signed-off-by: Qais Yousef CC: Jonathan Corbet CC: Juri Lelli CC: Vincent Guittot CC: Dietmar Eggemann CC: Steven Rostedt CC: Ben Segall CC: Mel Gorman CC: Luis Chamberlain CC: Kees Cook CC: Iurii Zaikin CC: Quentin Perret CC: Valentin Schneider CC: Patrick Bellasi CC: Pavan Kondeti CC: linux-doc@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-fsdevel@vger.kernel.org --- Documentation/admin-guide/sysctl/kernel.rst | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 0d427fd10941..e7255f71493c 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -940,6 +940,54 @@ Enables/disables scheduler statistics. Enabling this feature incurs a small amount of overhead in the scheduler but is useful for debugging and performance tuning. +sched_util_clamp_min: +===================== + +Max allowed *minimum* utilization. + +Default value is SCHED_CAPACITY_SCALE (1024), which is the maximum possible +value. + +It means that any requested uclamp.min value cannot be greater than +sched_util_clamp_min, ie: it is restricted to the range +[0:sched_util_clamp_min]. + +sched_util_clamp_max: +===================== + +Max allowed *maximum* utilization. + +Default value is SCHED_CAPACITY_SCALE (1024), which is the maximum possible +value. + +It means that any requested uclamp.max value cannot be greater than +sched_util_clamp_max, ie: it is restricted to the range +[0:sched_util_clamp_max]. + +sched_util_clamp_min_rt_default: +================================ + +By default Linux is tuned for performance. Which means that RT tasks always run +at the highest frequency and most capable (highest capacity) CPU (in +heterogeneous systems). + +Uclamp achieves this by setting the requested uclamp.min of all RT tasks to +SCHED_CAPACITY_SCALE (1024) by default. Which effectively boosts the tasks to +run at the highest frequency and bias them to run on the biggest CPU. + +This knob allows admins to change the default behavior when uclamp is being +used. In battery powered devices particularly, running at the maximum +capacity and frequency will increase energy consumption and shorten the battery +life. + +This knob is only effective for RT tasks which the user hasn't modified their +requested uclamp.min value via sched_setattr() syscall. + +This knob will not escape the constraint imposed by sched_util_clamp_min +defined above. + +Any modification is applied lazily on the next opportunity the scheduler needs +to calculate the effective value of uclamp.min of the task. seccomp ======= -- 2.17.1