Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4410103ybz; Tue, 28 Apr 2020 10:48:21 -0700 (PDT) X-Google-Smtp-Source: APiQypJtky+32po8c6gtBRQrVOFJpzj8PzSMr1TaTxPz2uarxbwKdFsfH3qiHON0D1PNR/RiQB02 X-Received: by 2002:a17:906:770b:: with SMTP id q11mr25076081ejm.224.1588096101277; Tue, 28 Apr 2020 10:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588096101; cv=none; d=google.com; s=arc-20160816; b=WC9D9SwYYJSchI8UBXEh61dp4jNPggAco58Gff6qKNUgNPjycD93kX55VE4AIxrWFR nj6qmZXp4lGj+6SxT5pVxiaTuvvyb2h/Wll1hdxS1oSTT2IEn2s1KFZBXK84FSo3AWe5 L1S8GRCjTV+u4Cg3M9cH6hpuEpbvAHiOpJnhBtwFdrskZ1C60X/hlYsFX5hmorZKJmnu FUmF7nESjarb1nRQH8g9cl9ziZQQRDvgMr6UvrVakjsa+h6oD0ELG7iNnc9zKwpQYbmx gLDCFJVM4XFqhZlAheowd1kkNwxL8ZoHb3T4E81nhjw4yUN4HWmgfDpnRG+etpWP3fLR ropw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=E3tpxsfqlJ97OhshENU/bqkOyW+k00vUERJl57WfGXE=; b=ZkZVzD857wOwRIs++jMCl7qbecPeefgEqzvpF1UDs+WdZBd1wgHoDb1ce8t3A4YQUJ TCGUnGvbN/696TYnx8Jt4ubFZaU5Mf6i+cutejaIeQdPcLpcx6LpXGIis/XuxJitWtfh IFV6ec7xPR96+RBlctduURhZZbFqbHqtkuzB8IYstKvsnvjB8xC3tvSY/qxGa0wdcXiz lR+t3Fh81+BdEVPaPsX1kJllV8nSzC2xMpGT711ZjtAu4mO1IlUVlZHkoNkdMNOr/wCG VIIe0f7GJ+f3Ch9EdOErfA0wWlvmbuBtY50WQ8mMUrKIJTe4odl2LuYa60oLCLXj6mCW zDOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=naNiCbki; 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 z70si2225545ede.463.2020.04.28.10.47.58; Tue, 28 Apr 2020 10:48:21 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=naNiCbki; 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 S1728462AbgD1Rnh (ORCPT + 99 others); Tue, 28 Apr 2020 13:43:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728313AbgD1Rng (ORCPT ); Tue, 28 Apr 2020 13:43:36 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9C66C03C1AB; Tue, 28 Apr 2020 10:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=E3tpxsfqlJ97OhshENU/bqkOyW+k00vUERJl57WfGXE=; b=naNiCbki4HJTsh6kFqJ+IsEM9p /uJSiyc/o80OXP4HiVcr+4nkUkieBrZoqwb3OJNOotj9nCfogjq9T5I9syeUCllx4L6ZkeIcKc1cc qxajHmi78bYbEIFQK1rOtZOShvijGVMr98kVlJevomZa623+sJt7Ir1zYjwdqVoG+jQoZOaAU3vnE /DIrZRn/UMt8YfR080vEGgPx2gB5zLrRAE29fLNsK0gckGHir21jNeXNQHBkD5nKXFX41S0zyvLtg DKLjM5mbV7nHglbVu6DJrDBLThyf1aR25AgqxJ+sfe2pgkr2LNJ601lURnn5qiIgklYuq5vzozs1D ZCMFlpTA==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTUGY-0002fJ-QK; Tue, 28 Apr 2020 17:43:30 +0000 Subject: Re: [PATCH v3 2/2] Documentation/sysctl: Document uclamp sysctl knobs To: Qais Yousef , Peter Zijlstra , Ingo Molnar Cc: 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 References: <20200428164134.5588-1-qais.yousef@arm.com> <20200428164134.5588-2-qais.yousef@arm.com> From: Randy Dunlap Message-ID: Date: Tue, 28 Apr 2020 10:43:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200428164134.5588-2-qais.yousef@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi-- I have a few corrections for you below: On 4/28/20 9:41 AM, Qais Yousef wrote: > 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 i.e., it is > +[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 i.e., it is > +[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 by default, which > +run at the highest frequency and bias them to run on the biggest CPU. biases them > + > +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 > ======= > thanks. -- ~Randy