Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp579953ybz; Fri, 1 May 2020 04:51:27 -0700 (PDT) X-Google-Smtp-Source: APiQypJc0N9mSJNzfRU0/0kQXcwrgxA2nXzSqrN7h5FMiHzq43CKXk4FPZh7hxv0Z+3NBP72obmG X-Received: by 2002:a17:907:9489:: with SMTP id dm9mr2892701ejc.9.1588333887158; Fri, 01 May 2020 04:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588333887; cv=none; d=google.com; s=arc-20160816; b=c8TQXgbLlMw1SoWxKcDIMYwnB6WGkMw+Cd/dWe0WeX38Qgg5iZ05XfGkwdSLDa2MLF OTkQHi1z3aepcl7O7S/21YJQRslUdDRcrdTqzLTGvYmM28Xhe0PfsWX6VDBu/aWT7A2O 7KljN9qv7TM/dsT9Rec38FsW7Gg/fWB+US3Bq+SGD0kNqXdkGVX0MWmSZN3d7uDgttf0 Ei+na46RVph0X36d4D+hYcvOEvTkawjnEGheSsVpso8JNoAYRH5K+JTdEButPjnapD51 7VvZxKM6ytr8G0Jvmgd+3EEQUoeMORGjoDO23enwVjpx+aS3T68wHc7e09I7wnRORXXy U3vw== 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=+oFxUZeQXHmuPwfQBLaPGtyJpw5yYnitzWjEykmrlFE=; b=ceWoH0YKIXIoI3vXopcoxpdAL7/lDsuFswPeA/NukUSRcSSU2ESs1Ti4SLEWL5dedT hS/0YuKiMHT6HF7cz7C15sVO4RsCwV24haoOqQ1EUd4goVqQV110X5x6TlJ095D5PmCu HemeELWZ1jy5GI+bDoxw5oJa/uFyTpEfgZIfh4dH6QJOF2SqkAfR6eoJDCSDOlkqOUF/ +/68TmrY+7Bgt5SiHlq1jhzEocA/7y9sI34IbNbAWdd/MqNLggojpqmSxx8K6TnBRQq+ +YbpwOZM8KU6WxmPD1DF44lnU7VfVOtn1kHoZdSiQMVGyuK5klfe511SAgTnPsstl3T9 mduw== 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 n16si1596407edy.219.2020.05.01.04.51.04; Fri, 01 May 2020 04:51:27 -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 S1728756AbgEALtj (ORCPT + 99 others); Fri, 1 May 2020 07:49:39 -0400 Received: from foss.arm.com ([217.140.110.172]:39040 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728575AbgEALti (ORCPT ); Fri, 1 May 2020 07:49:38 -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 1403631B; Fri, 1 May 2020 04:49:38 -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 89AA53F305; Fri, 1 May 2020 04:49:35 -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 , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v4 2/2] Documentation/sysctl: Document uclamp sysctl knobs Date: Fri, 1 May 2020 12:49:27 +0100 Message-Id: <20200501114927.15248-2-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200501114927.15248-1-qais.yousef@arm.com> References: <20200501114927.15248-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: Randy Dunlap CC: linux-doc@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-fsdevel@vger.kernel.org --- Changes in v4: * Punctuation fixes (Randy Dunlap). 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..521c18ce3d92 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, i.e., 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, i.e., 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 biases 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