Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1132021ybh; Thu, 16 Jul 2020 04:10:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiQNB1g5TqyEnlUZrktLGWSLc1ydi1QoROBih7HzBH07mj6NXcKPFKkMRnu3T6MpBECksy X-Received: by 2002:a17:907:20b0:: with SMTP id pw16mr3033512ejb.551.1594897824529; Thu, 16 Jul 2020 04:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594897824; cv=none; d=google.com; s=arc-20160816; b=f+j+9sjVMqKoqHvSO7M5qs13tzD6OtxgbcwBRey++qIRH7VY45WMEg1yMYzwrrUL1v RAxZYSHCInqh7/yegdhNgcSrup61EBuTs0QRe6NEn4Dlai097NlpTzzUdkFoOUjIVY++ /IHswDoc4RtRnfigVA3MNEClaCsXmUjiEPhq0NqMHxAQxrYSPOuvnYMg3sM2WTRC2Hlh 11AMdTFX8nLwwahedMnVzQLqJNNsi6Sm3t6dkt601Ajvbr1mwmQpOAflSRZLUacQRtu0 xcKGvvlaja5+YaLStTXHDbXCZVF8mmvoafYKlBmp76PQ7RJTK0Nei9SLchMJQ8xj8jSV Lnuw== 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=ImEb2lVINU7LBwrewPDa29U2pBTstVxNFAS4c6usWTw=; b=jJMVabxXXIUfQtnXsgftJcrLVRvvPjOS24afajUskH6Scw6rVCEw4WZ8v+uTY8snKr oEiF4ej/ToNsdpC1NFHbNnqLVNZICoq/kexonlTX5+DtSKbGhjxlwwBR8BbXlNMkvxcq MdaWATn3Zvm8tPa3jCjdgZRMWHIoKNUgwsJuVVnj6FN4glaRcYhYNquqJW7ZLjn8peSy GFek4CUXddNVgIzBmAUghPcQ1pTpe8P+dwViR+aGLjajttATN0lh6io4Q1yhg5+ZQSvD 9G3dSZDnlSdv9plWYZK5drbXU70FtCVD4JqWb9ZdtqrYDB1zGk2VJgK+lOYranGtIiC8 vOWQ== 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 rl28si2949232ejb.353.2020.07.16.04.10.01; Thu, 16 Jul 2020 04:10:24 -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 S1728129AbgGPLHc (ORCPT + 99 others); Thu, 16 Jul 2020 07:07:32 -0400 Received: from foss.arm.com ([217.140.110.172]:58250 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbgGPLHc (ORCPT ); Thu, 16 Jul 2020 07:07:32 -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 6390A1063; Thu, 16 Jul 2020 04:07:31 -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 D620B3F68F; Thu, 16 Jul 2020 04:07:28 -0700 (PDT) From: Qais Yousef To: Ingo Molnar , Peter Zijlstra Cc: Doug Anderson , 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 v7 2/3] Documentation/sysctl: Document uclamp sysctl knobs Date: Thu, 16 Jul 2020 12:03:46 +0100 Message-Id: <20200716110347.19553-3-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200716110347.19553-1-qais.yousef@arm.com> References: <20200716110347.19553-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 | 54 +++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index 83acf5025488..55bf6b4de4ec 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -1062,6 +1062,60 @@ 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 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 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 +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 range constraint imposed by sched_util_clamp_min +defined above. + +For example if + + sched_util_clamp_min_rt_default = 800 + sched_util_clamp_min = 600 + +Then the boost will be clamped to 600 because 800 is outside of the permissible +range of [0:600]. This could happen for instance if a powersave mode will +restrict all boosts temporarily by modifying sched_util_clamp_min. As soon as +this restriction is lifted, the requested sched_util_clamp_min_rt_default +will take effect. seccomp ======= -- 2.17.1