Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp450712ybb; Fri, 3 Apr 2020 06:00:53 -0700 (PDT) X-Google-Smtp-Source: APiQypIFywlSmdLy76q74D/ewbQvTScY4qEh3Uf7pfVckGWY7vMzNRLVylUAskaADyQI9vCo9O/v X-Received: by 2002:a05:6830:200c:: with SMTP id e12mr6380544otp.198.1585918853134; Fri, 03 Apr 2020 06:00:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585918853; cv=none; d=google.com; s=arc-20160816; b=bLDp6IvC8mDP7vQmRlfEl0KtaGrFCSHIPCLfWFPYbamEpncXw1l5lnqitChQj+dzgN g/531Hs16chE+2XmBhHHO51hsecE1AQFs8v36OITvriT1UK32YIG8X+/IFaoNcbQxZza zka8rHzMDmV5WJvikIi8/l/k/aEvFoDjv8FxSXvI/qlVPU5+fSs9s6FolaaBmG6ALQYo sq3b3iMTs68RceJnsS0tXfVAv+cD/Vr5+asvhONjrdfgmMw+Bsa8puuCufnWaL8SjZKq mp6EPmZbAYDUGK0MkVSgzRQdKVezQIH1hRSWt59GcI45QuBJJzvZAEVtZxsALy70cQU/ O36A== 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=h04rC/OgVkwmt6/LIWfJ5HiIBCPxXSCHLjzQkO4OpMA=; b=YPzoGT8wlOeirY7sDV5FThPN9g8a4mT8EEoEycAhZkFDucO4bqKcHGmPy6wlUZnPOh M9vZpTFR4esDKYOWQOY1J27Lwz5ym93qhuQRNRS/csZ9wvOvQWr1VuCPLAjGctt6KK+Q bCgQHE1RisxBTHGyS1IvA3JeCXsIxaYoavr0fwGKtX7np18jClpVhpCJ+y43bEDFjuex SSfKFOykLH1dWnQZ9lDEH1eE3lEnXZIOeCCbNHZWyf8CjULzZK1GACygzlCHg7vh/pDs ZjRtMyxUSn6Q9uHTveskAzli2teEOZJQo9qcEdcrQ30Bhm5RgWSsAf6wI+o+efBe5no6 uwOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si3979776oti.106.2020.04.03.06.00.36; Fri, 03 Apr 2020 06:00:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403949AbgDCMbl (ORCPT + 99 others); Fri, 3 Apr 2020 08:31:41 -0400 Received: from foss.arm.com ([217.140.110.172]:52636 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728099AbgDCMbl (ORCPT ); Fri, 3 Apr 2020 08:31:41 -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 9086230E; Fri, 3 Apr 2020 05:31:40 -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 2A65F3F68F; Fri, 3 Apr 2020 05:31:38 -0700 (PDT) From: Qais Yousef To: Ingo Molnar , Peter Zijlstra 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 2/2] Documentation/sysctl: Document uclamp sysctl knobs Date: Fri, 3 Apr 2020 13:30:20 +0100 Message-Id: <20200403123020.13897-2-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200403123020.13897-1-qais.yousef@arm.com> References: <20200403123020.13897-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_rt_default_util_clamp_min 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 | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index def074807cee..5e974cd493b5 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -935,6 +935,53 @@ 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_rt_default_util_clamp_min: +================================ + +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 +hetergenous 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 RT task wakeup. sg-big-buff: ============ -- 2.17.1