From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA45BC38A2D for ; Wed, 26 Oct 2022 10:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233068AbiJZKof (ORCPT ); Wed, 26 Oct 2022 06:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233389AbiJZKoc (ORCPT ); Wed, 26 Oct 2022 06:44:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3874610051 for ; Wed, 26 Oct 2022 03:44:31 -0700 (PDT) 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 27A3523A; Wed, 26 Oct 2022 03:44:37 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A1C13F7B4; Wed, 26 Oct 2022 03:44:26 -0700 (PDT) Message-ID: <9d06c9ce-d4b3-23a8-9f9c-c1054de1aeb5@arm.com> Date: Wed, 26 Oct 2022 12:44:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v5 7/7] sched/fair: Add latency list Content-Language: en-US To: Vincent Guittot , Youssef Esmat Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, parth@linux.ibm.com, qais.yousef@arm.com, chris.hyser@oracle.com, valentin.schneider@arm.com, patrick.bellasi@matbug.net, David.Laight@aculab.com, pjt@google.com, pavel@ucw.cz, tj@kernel.org, qperret@google.com, tim.c.chen@linux.intel.com, joshdon@google.com, timj@gnu.org, joel@joelfernandes.org References: <20220925143908.10846-1-vincent.guittot@linaro.org> <20220925143908.10846-8-vincent.guittot@linaro.org> <20221012152130.GA20993@vingu-book> From: Dietmar Eggemann In-Reply-To: <20221012152130.GA20993@vingu-book> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/2022 17:21, Vincent Guittot wrote: > Le mardi 11 oct. 2022 � 18:54:27 (-0500), Youssef Esmat a �crit : >> Hi Vincent, >> >> On Tue, Oct 11, 2022 at 12:10 PM Vincent Guittot >> wrote: [...] > @@ -10894,12 +10898,17 @@ static int cpu_idle_write_s64(struct cgroup_subsys_state *css, > static s64 cpu_latency_nice_read_s64(struct cgroup_subsys_state *css, > struct cftype *cft) > { > + unsigned long period = sysctl_sched_latency; > int last_delta = INT_MAX; > int prio, delta; > s64 weight; > > + if (sched_feat(GENTLE_FAIR_SLEEPERS)) > + period >>= 1; > + > weight = css_tg(css)->latency_offset * NICE_LATENCY_WEIGHT_MAX; > - weight = div_s64(weight, sysctl_sched_latency); > + period = sysctl_sched_latency; Looks like this line is wrong here, period has been set already for GENTLE_FAIR_SLEEPERS and !GENTLE_FAIR_SLEEPERS? > + weight = div_s64(weight, period); > > /* Find the closest nice value to the current weight */ > for (prio = 0; prio < ARRAY_SIZE(sched_latency_to_weight); prio++) { [...]