Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2868233ybk; Mon, 18 May 2020 09:51:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy6b/vhNPAW5SdKiCP73E6jaMTxH3eVwJpX3/H1c8ez4wlsjCTkfAKGsC27bWtYXy/AjQa X-Received: by 2002:a17:906:7ac8:: with SMTP id k8mr16472768ejo.235.1589820680191; Mon, 18 May 2020 09:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589820680; cv=none; d=google.com; s=arc-20160816; b=YnOkJGJPqv/C17TG9cBZHJk0na7gmWC4tHiWeWIt8EBo/2DUqamxkZsfi6hdXslKaR oeIZ1qNZP+srgFwp+xtxCXUfiARNN2ZPDW0OIlmKe/bEROJ8D1QSSMTFVo8AKueS+PEU XqWBqCGqhUlEW5/Bd6ghDm63/DA9oHe7r4ErhaRz2hF2GX4C5UnaMsUR0OsuZbImP90F 2wmN2XOWKyBmwqC4Q+gtkOb3t+9f/BtBlL73OFeE37Me1owlB3u6GiTr+uYIc8xpksnP hG6538tIPckXVCEkJq8Jf05euI00go/zxql+i9BwyQfmlW6NaDjgM0iZWB2b3ATzZ2kx VN7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TZDP/lxhf+gDENXu3rD7b9G8o9ZorSZx8J9lmul5pFA=; b=am2hbhk/kgWHpEkp2wc3FZI5E2mal/MGiTJvMs2DNG1SNEHSIq3imr1d3YgAYKibNc vk8N+N38Hhas7M5ich42M3oGXzBRkeXvId/21CL9lhyEMtzO9RkuOknSJ/iCmP+vVCPq ZIa0fIby5Ij6qce8mkTZKG2kwm/Zue1JSIE+EHMw6reHr0BRn6QN9x2W+exXsW1gen+o 8zGn0kUIkRVBVEwVH+bUoJqityECxv9UxKHdym4OhUsMd85+GUAqYvXqJK5ZLjFRU8ZC yOsQ7Ii0BQC+biS7P5gW5ea9u7Txf+65E806jnC2dsmxGaWp2EuYEL6Otm/M9BPPeRZz x+NA== 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 x15si1275825edr.405.2020.05.18.09.50.57; Mon, 18 May 2020 09:51:20 -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 S1728376AbgERQtf (ORCPT + 99 others); Mon, 18 May 2020 12:49:35 -0400 Received: from foss.arm.com ([217.140.110.172]:44270 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728150AbgERQtf (ORCPT ); Mon, 18 May 2020 12:49:35 -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 CD5D8106F; Mon, 18 May 2020 09:49:34 -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 683E73F305; Mon, 18 May 2020 09:49:32 -0700 (PDT) Date: Mon, 18 May 2020 17:49:30 +0100 From: Qais Yousef To: Dietmar Eggemann Cc: Peter Zijlstra , Ingo Molnar , Randy Dunlap , Jonathan Corbet , Juri Lelli , Vincent Guittot , 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: Re: [PATCH 1/2] sched/uclamp: Add a new sysctl to control RT default boost value Message-ID: <20200518164929.dja4ry6iiq3jny72@e107158-lin.cambridge.arm.com> References: <20200511154053.7822-1-qais.yousef@arm.com> <01c318b6-a109-2b8a-0ac3-a25b3c61e45a@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <01c318b6-a109-2b8a-0ac3-a25b3c61e45a@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/20 10:31, Dietmar Eggemann wrote: > On 11/05/2020 17:40, Qais Yousef wrote: > > [..] > > > @@ -790,6 +790,26 @@ unsigned int sysctl_sched_uclamp_util_min = SCHED_CAPACITY_SCALE; > > /* Max allowed maximum utilization */ > > unsigned int sysctl_sched_uclamp_util_max = SCHED_CAPACITY_SCALE; > > > > +/* > > + * By default RT tasks run at the maximum performance point/capacity of the > > + * system. Uclamp enforces this by always setting UCLAMP_MIN of RT tasks to > > + * SCHED_CAPACITY_SCALE. > > + * > > + * 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 only affects RT tasks that their uclamp_se->user_defined == false. > > Nit pick: Isn't there a verb missing in this sentence? > > [...] > > > @@ -1114,12 +1161,13 @@ int sysctl_sched_uclamp_handler(struct ctl_table *table, int write, > > loff_t *ppos) > > { > > bool update_root_tg = false; > > - int old_min, old_max; > > + int old_min, old_max, old_min_rt; > > Nit pick: Order local variable declarations according to length. > > [...] > > > @@ -1128,7 +1176,9 @@ int sysctl_sched_uclamp_handler(struct ctl_table *table, int write, > > goto done; > > > > if (sysctl_sched_uclamp_util_min > sysctl_sched_uclamp_util_max || > > - sysctl_sched_uclamp_util_max > SCHED_CAPACITY_SCALE) { > > + sysctl_sched_uclamp_util_max > SCHED_CAPACITY_SCALE || > > Nit pick: This extra space looks weird to me. > > [...] > > Apart from that, LGTM > > For both patches of this v5: > > Reviewed-by: Dietmar Eggemann Thanks Dietmar and Patrick. Peter, let me know if you'd like me to address the nitpicks or you're okay with this as-is. Thanks! -- Qais Yousef