Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3422706pxp; Tue, 22 Mar 2022 20:25:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4BHNgepyTQXnuFDNx8ELHTtrqfitQIvCxFehRJI06xORZkIdZTkttnd0mrMytHvwpnrgG X-Received: by 2002:a17:90b:4b44:b0:1c7:41d:9428 with SMTP id mi4-20020a17090b4b4400b001c7041d9428mr8845746pjb.85.1648005918827; Tue, 22 Mar 2022 20:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648005918; cv=none; d=google.com; s=arc-20160816; b=AR9ejMNpbAJCKew/Wtq27wDQq5guJ3fMTQ/WBMXZpQQjP9j7qH6q6VTvcgDEXf/XY6 va0icfvPAK25ljvk8LfF2xlKIZCt1VLqEb0pvfRXCCn/4TP+IXswNVa+pLLSS+9jvmzp WVn9aWAQCv8h5s2Ajh9+ki6OH9kH4dk2YA5qQA5n/109QGcCe3mSS7PAPPJqVVH9CRh1 oKc1rCPP1nk2CEskm37he/XnGRTrlnkW3H1rK4hzPOdsfzPVPBML/nB0XSzSUmboCdyo P86P2J/OSPYLXNAd0basZ4GpXovSxJ4aNCxBj3zHakz1X/Vg56z148GmISBj5YntCGpc kwJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4grXaZDRtzVFEImdnWSYsmh756fJ7h8Ts6/UkZ9wdbQ=; b=g/TNn3qol9LxRo4gdl2jnFlIhrRmHS6vdzltpC1RuDBnzycrvgfSKt+Hk5eckctzHi 0zrdPYI9J0z8gwfZHYBVqo5TWV8+NWMLzo9tLf8s1uJWq6aTqEITxy8XorJwZSyKvfeV adSkMKw8jYDvn7/LXUmyqRH00A83rczlxXLbOeERG9Tp5lRkWBMga0UlE3mmqVrIoG2T Z80t2vMDPi1xRP6WVjPP9PttWoqwMSRB6E47uLshjCWheA4kJD2onoG0Yij8fsqzRB81 FYQpumIDGmKcGYU6xdNBdYJf9Wz5py2mS9dvTixNyVpP6oZ1DGebUaZkjtlo9ilPKpUe /v/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fGX/oDEL"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a056a00240e00b004fa3a8e000csi13547341pfh.195.2022.03.22.20.25.04; Tue, 22 Mar 2022 20:25:18 -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; dkim=pass header.i=@linaro.org header.s=google header.b="fGX/oDEL"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236297AbiCVQMV (ORCPT + 99 others); Tue, 22 Mar 2022 12:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236170AbiCVQMU (ORCPT ); Tue, 22 Mar 2022 12:12:20 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08EF1E0D6 for ; Tue, 22 Mar 2022 09:10:52 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id h11so24620501ljb.2 for ; Tue, 22 Mar 2022 09:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4grXaZDRtzVFEImdnWSYsmh756fJ7h8Ts6/UkZ9wdbQ=; b=fGX/oDELudWkZfbJNfkbrdU3sEtYsHfs8ovbdYPuONxNITeyO8o4b4Nh2Q9bcXni1h nLDhYDSR/xHHxYg15icHwFx/7YQE9nlqbxYPXY1lIc0J1qyzOiOwx1opS7Xs13VJmqMf ie4PaeLQsIvUmRJlJBNWEoJHceLQuDZAcZhxvMv887AtS5OsGmGMns2e7CmnSRZWZy4Y UX5z1QsfKAyOn9lGrE2YexTsmEYTps/XBzexPXee//ZuQyiay00T2tE11PJ/fVD4et+9 v0p8lpvyQvFaGf7EmcgXegEapEaQApjZpLwMVoBU57kBJmgrbGOHC39N70U6D9EJSB4/ Hd8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4grXaZDRtzVFEImdnWSYsmh756fJ7h8Ts6/UkZ9wdbQ=; b=cKE56esECIcOwL7+jBGMDDXG39DNGMp8d2gc7AOSogQ+AP3cvGBeU8nG/yGq0jd+2b EA71mlS+yVto0pUwt+0XUM//T745amgDa60tEJoRLvgCnqZTZydCf8YFkGmDlL7QHn1J Y0V0LdezFLBu5EjwZTGvvKl3ITu9GBbaJ5EV8zdOSGZpEKV/ODw01JT8PouTwU/gGqX0 L94BbrUnDhznr0E8AZCtAqqNKW7pKpUR0pg/q8fFUe+Jb4NXr9YTSMVvq9QQ7RcSj9t7 RZU44+v9HXmDIogRGotBAFzSEit0lraJnI5QNgtxVEyXJz+NrDpmz+UmbwWz2koPqFJD kSQQ== X-Gm-Message-State: AOAM532kbjJs0cGqd245FlHqXBTz317Ufxk17YY7p8sT/+6PhpiYaQoO ePz4lb3OczuLjHlAlic0dxk1QJDcJ8G4+8IjFRFNJw== X-Received: by 2002:a2e:b5b9:0:b0:246:b30:64c8 with SMTP id f25-20020a2eb5b9000000b002460b3064c8mr18972308ljn.17.1647965448013; Tue, 22 Mar 2022 09:10:48 -0700 (PDT) MIME-Version: 1.0 References: <20220311161406.23497-1-vincent.guittot@linaro.org> <20220311161406.23497-7-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Tue, 22 Mar 2022 17:10:36 +0100 Message-ID: Subject: Re: [RFC 6/6] sched/fair: Add sched group latency support To: Tejun Heo Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org, parth@linux.ibm.com, qais.yousef@arm.com, chris.hyser@oracle.com, pkondeti@codeaurora.org, Valentin.Schneider@arm.com, patrick.bellasi@matbug.net, David.Laight@aculab.com, pjt@google.com, pavel@ucw.cz, dhaval.giani@oracle.com, qperret@google.com, tim.c.chen@linux.intel.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi Tejun, On Mon, 21 Mar 2022 at 18:24, Tejun Heo wrote: > > Hello, > > On Fri, Mar 11, 2022 at 05:14:06PM +0100, Vincent Guittot wrote: > > Tasks can set its latency priority which is then used to decide to preempt > > the current running entity of the cfs but sched group entities still have > > the default latency priority. > > > > Add a latency field in task group to set the latency priority of the group > > which will be used against other entity in the parent cfs. > > One thing that bothers me about this interface is that the configuration > values aren't well defined. We have the same problems with the nice levels > but at least have them map to well defined weight values, which likely won't > change in any foreseeable future. The fact that we have the > not-too-well-defined nice levels as an interface shouldn't be a reason we > add another one. Provided that this is something scheduler folks want, it'd > be really great if the interface can be better thought through. What are the > numbers actually encoding? latency_nice is quite similar to nice. The nice latency is used as an index to get a latency weight in the range [-1024:1024]. latency_nice is in the range [-20:19] and latency_prio shifts it in the range [0:40] . This index is then used to get the latency weight similar to how the nice prio is used to get a weight. That being said, the latency should probably reflect the latency_weight instead of the latency_prio in order to be aligned with the weight and weight.nice fields of cgroups. As described in patch 5 commit message, the weight is then used to compute a relative offset to check whether the waking task can preempt the current running task. Vincent > > Thanks. > > -- > tejun