Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4006355rwi; Wed, 12 Oct 2022 09:21:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM789huFYAisoHtThanS0hHQU3kF8lENh3JNhJ3Ayx0YXgcPNNXCzH3EGltXMCtIx1w8IcLa X-Received: by 2002:a63:200e:0:b0:45b:d6ed:6c5 with SMTP id g14-20020a63200e000000b0045bd6ed06c5mr25973187pgg.121.1665591677986; Wed, 12 Oct 2022 09:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665591677; cv=none; d=google.com; s=arc-20160816; b=wfAPoJGNlwcNictVkL033dwmZU2XUTuCnWodMtcqgk3XNZVZvTU3gUl60pNEj5WFnk Eb7hDX7kVPlHSldhPHKUkj90sgnbSZu5thpWtt1W4bOqZ/aC/mqLX7sbLB8jAjvQAbTj +TDMLUUBQHP30z9SW+L+43d33NI5cQsx1WXsLMG0T/LJXkfHdyeDfjDdJwERL6vHaMvP QCj0iNen4vDJDtY3g7EFPCwRoRAjpY1hrlaEOzVbOcut++31Zaplcl7iormec8PcYHxg VqZWUWI5ck+FHZTQcUjuSEoZwrhtaktf9UhTo5b4Tyt0PBWQ4wKYAceYWbYN54MB7bnq oqJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=d4S/9nK94ArhdhciNSw8QUNAgmfvYIBghJheCbSgyws=; b=lcQvZxZsSxHtiBxPqLGdR/80hbfINWCCNHPI0JiKSiDLf4kohZOO8zok74eVm8uK3f CMw2RstofUc4HpKNny+c3UXVdeUnDXjEXCaflAttKuYsMlMq+2UTMhq7Uy5VpjEFEiNd cCKOOl1GuSKZzByvRu03K1uA7lmv/bND//YVmGA5ORgs+KwoHdF68HJUx6jXlbEhaicp VDVd62nfpRLLGXyvfjWpbyUtcsN6RPu+UVyBEcWTVx03dfEX2Zlx5q01w60c8C7Kxz1b dpIY8w5P17XLmQsB+u/pDgZ9U9dEj6o94eZCHPmo8qKTq2KZFaARcyjnLKPVfuxwqgB6 EgJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 184-20020a6302c1000000b0046040a8be4esi14842675pgc.754.2022.10.12.09.21.04; Wed, 12 Oct 2022 09:21:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiJLQHm (ORCPT + 99 others); Wed, 12 Oct 2022 12:07:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiJLQHk (ORCPT ); Wed, 12 Oct 2022 12:07:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90D77A0306 for ; Wed, 12 Oct 2022 09:07:39 -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 28FD8165C; Wed, 12 Oct 2022 09:07:45 -0700 (PDT) Received: from wubuntu (unknown [10.57.35.175]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED5D63F67D; Wed, 12 Oct 2022 09:07:35 -0700 (PDT) Date: Wed, 12 Oct 2022 17:07:34 +0100 From: Qais Yousef To: Vincent Guittot Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.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, 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 Subject: Re: [PATCH v5 5/7] sched/fair: Add sched group latency support Message-ID: <20221012160734.hrkb5jcjdq7r23pr@wubuntu> References: <20220925143908.10846-1-vincent.guittot@linaro.org> <20220925143908.10846-6-vincent.guittot@linaro.org> <20221012142248.k6pdjgxwkk2cshuu@wubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/22 17:42, Vincent Guittot wrote: > On Wed, 12 Oct 2022 at 16:22, Qais Yousef wrote: > > > > On 09/25/22 16:39, Vincent Guittot wrote: > > > Task can set its latency priority with sched_setattr(), which is then used > > > to set the latency offset of its sched_entity, but sched group entities > > > still have the default latency offset value. > > > > > > Add a latency.nice field in cpu cgroup controller to set the latency > > > priority of the group similarly to sched_setattr(). The latency priority > > > is then used to set the offset of the sched_entities of the group. > > > > > > Signed-off-by: Vincent Guittot > > > --- > > > Documentation/admin-guide/cgroup-v2.rst | 8 ++++ > > > kernel/sched/core.c | 53 +++++++++++++++++++++++++ > > > kernel/sched/fair.c | 33 +++++++++++++++ > > > kernel/sched/sched.h | 4 ++ > > > 4 files changed, 98 insertions(+) > > > > > > diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst > > > index be4a77baf784..d8ae7e411f9c 100644 > > > --- a/Documentation/admin-guide/cgroup-v2.rst > > > +++ b/Documentation/admin-guide/cgroup-v2.rst > > > @@ -1095,6 +1095,14 @@ All time durations are in microseconds. > > > values similar to the sched_setattr(2). This maximum utilization > > > value is used to clamp the task specific maximum utilization clamp. > > > > > > + cpu.latency.nice > > > + A read-write single value file which exists on non-root > > > + cgroups. The default is "0". > > > + > > > + The nice value is in the range [-20, 19]. > > > + > > > + This interface file allows reading and setting latency using the > > > + same values used by sched_setattr(2). > > > > I still don't understand how tasks will inherit the latency_nice value from > > cgroups they're attached to. > > The behavior is the same as for sched_entity weight. The latency is > applied on the sched_entity of the group But this is the point I am raising. Not all users behave the same as weight. In EAS we just look at the effective value of the task (see uclamp for example). We don't care about the group value except to calculate how it impacts the task's value. Or am I missing something here? Cheers -- Qais Yousef