Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5750867rwb; Mon, 14 Nov 2022 08:59:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf6lBR+4fYH+hdA3mpLhtzLr3SnZ0460Yy+54u7fczvBOYWQ8lsf82kh4wfuq60YhkQZGjEH X-Received: by 2002:aa7:c6d5:0:b0:461:2915:e41d with SMTP id b21-20020aa7c6d5000000b004612915e41dmr11780028eds.184.1668445174748; Mon, 14 Nov 2022 08:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668445174; cv=none; d=google.com; s=arc-20160816; b=YXoHzyrYwE/mP2JtpGnOwkugU2ch+T0pPKf1onpvd21GhFHPkjUhOecarxjh/jnUWe bvBX95VSNqdVJKtvagZzEx8JDwMukqRsGv12Q2Uvpkz+X2GzzcXcJhPlyiVzGklmDoh+ nQai4QTae7G26C+aGoB8+5/rDAKcKrUrC0mzg8g+aopBMX808lPi5Lo1/al5aElL9iAy 7QbENezBVgGOUgCTcrUFtmKFqYZhJC1hu7y4ygs/Ia5E+3TeHuh+VZyWLpTBMjhlaWWM YrwC79fLRZ283pmR+QD9e/eIg/DYdykulmgJmbgdKAD4hwNkFno1Eijt7y/n5xtKHpgy fkSQ== 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=aimDqY0RjB+gPNJoEJ+Cxlak9hzcynx+8kIMR7cwNXg=; b=dU8H+rqL1U10K9T9WLzanJDhmlQeDh3BZk8L5W5sePIMliMonY/RcadQMbpyQQj3bD 4ewL3+s/xFyHZoUZSOAudy448vW9KBrz/gPEAl/c7Z+zpVjp09sgkDsySlI8laESzc4T ajHn9wirM12rLPpN9/UyLR2kEq7sIcm66E6duNVeno3mHl025muWu5xBeKW3K+gPaKT9 /BuTaOtuljBYaTeGpDiEtgsrXWUkOQU7pj0iGEud7bDjUTuy6WBQoyc+4Xz1lqAFjZp/ iNomv/8egR4NHOm1wD+PgEa99t2Xr24SyNuylAkMWCY1jEleack8HCpY8HQZB0talpvZ t0VA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a170906349200b007ad976163f4si7731544ejb.254.2022.11.14.08.59.12; Mon, 14 Nov 2022 08:59:34 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236569AbiKNQVE (ORCPT + 87 others); Mon, 14 Nov 2022 11:21:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236458AbiKNQUz (ORCPT ); Mon, 14 Nov 2022 11:20:55 -0500 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C9A965C6 for ; Mon, 14 Nov 2022 08:20:54 -0800 (PST) Received: by mail-wm1-f42.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso11055756wme.5 for ; Mon, 14 Nov 2022 08:20:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aimDqY0RjB+gPNJoEJ+Cxlak9hzcynx+8kIMR7cwNXg=; b=Oo1TZik5Yj/kSw42mUBhFqikMRXd0ud4/4zhVo3uhtZ6ssIQqpo6qeQ5iC7lZ3SuLX d59ww4b711eFEncJL1DYyULng3v4+utn8uBxJ/4ieZwx2soFY5zUXF3aSNEIL955qlcs n/ewbjNWe2LLJXnKzzamwL3K45yMD3JiqZ1kQQ/2yfugS/urM1Cd+vdtHRGUVR6JvwJC Tz1GNHWL1YhWt2Q6nxQj1SLT6p2jufyXfGUMOCkYblDf+l25ZFXRSG4lONLO1Z2K7taz BPndwrHSsT5hPKQ5d5fWsYL8kP9UIUlVK43tV/QB+SzsDctB4vkynyO1bh2Wb6CHEGCP 5P0w== X-Gm-Message-State: ANoB5pmQJK1ZXKs32/P0nvtZx9aD+C2cR1B0dxFAmtuzt7RASqSy2AXt 5Up2Ktlc0uTTJBWxdxJ3H74= X-Received: by 2002:a05:600c:3516:b0:3cf:8952:300c with SMTP id h22-20020a05600c351600b003cf8952300cmr8666627wmq.51.1668442852457; Mon, 14 Nov 2022 08:20:52 -0800 (PST) Received: from google.com ([51.154.17.58]) by smtp.gmail.com with ESMTPSA id p13-20020adfe60d000000b00236e9755c02sm10062259wrm.111.2022.11.14.08.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 08:20:52 -0800 (PST) Date: Mon, 14 Nov 2022 17:20:50 +0100 From: Patrick Bellasi 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, qyousef@layalina.io, chris.hyser@oracle.com, 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, kprateek.nayak@amd.com, yu.c.chen@intel.com, youssefesmat@chromium.org, joel@joelfernandes.org Subject: Re: [PATCH v8 6/9] sched/fair: Add sched group latency support Message-ID: References: <20221110175009.18458-1-vincent.guittot@linaro.org> <20221110175009.18458-7-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221110175009.18458-7-vincent.guittot@linaro.org> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Vincent, On 10-Nov 18:50, Vincent Guittot wrote: [...] > diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst > index be4a77baf784..a4866cd4e58c 100644 > --- a/Documentation/admin-guide/cgroup-v2.rst > +++ b/Documentation/admin-guide/cgroup-v2.rst > @@ -1095,6 +1095,16 @@ 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). The latency_nice of a group is > + used to limit the impact of the latency_nice of a task outside the > + group. This control model is not clear to me. It does not seem matching what we have for uclamp, where the cgroup values are used to restrict how much a task can ask or give (in terms of latency here). in the uclamp's requested-vs-effective values model: A) a task can "request" (or give up) latency as much as it likes B) the cgroup in which the task is in any moment limits wthe maximum latency a task can "request" (or give up) C) the system wide knob set the "request" limit for the root cgroup an any task not in a cgroup. This model seems to be what we should use here too. IOW, for each task compute an "effective" latency_nice value which is defined starting for a task "requested" latency value and by restricting this value based on the (B) cgroup value and the (C) system wide value. That's what we do in uclamp_eff_get(): https://elixir.bootlin.com/linux/v6.0/source/kernel/sched/core.c#L1484 Why such a model cannot be used for latency_nice too? Am I missing something? Best, patrick -- #include Patrick Bellasi