Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp597480rwb; Thu, 22 Sep 2022 04:08:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6xYdkqQPHPNkZUf7DRlSZI3Iau7tQPQGHITt3tXq9whnLsDSW4/U7KxY7j5oEOd5XoUqBf X-Received: by 2002:a17:906:fd86:b0:777:d739:1ede with SMTP id xa6-20020a170906fd8600b00777d7391edemr2178193ejb.576.1663844885686; Thu, 22 Sep 2022 04:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663844885; cv=none; d=google.com; s=arc-20160816; b=cLx0fi+MnPjJv+36ZqTqQrKcJJaxTqmcJfXUWpftEOMMIznkaBsvP+HUZvYzKOKZkl s+B8K4UdeAYQ1/p0RAjuIABLP+S92Pri6uG920Tp4Q9yya0Pp8pdldckF4WFz7jHhR05 JxN4LEehi82PHPCAN1fE6mGI9FiVLkz7SN7/D7ofBrFfeZsci11PyGXZeZyNL3DyEDgw KLs5eof5wZ8Pq5BRp6mk2YsndVIUSrs+22HgAzup4GAYWipYtB6hnCV47+70+eBIOuuw +QH5LHxYsbM0zfXHOMhj5leEvYItnukG8FKaMIzEEPgZI9u/H/kCqSurOQUrpUEusrqw aLrQ== 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=zvfGlK0m/ly0pUDorWcKj2yHuY5x21E5LnIRK2TnSso=; b=kGngsbQuiMjFsjL4lsvufMrHN29TkVC4EWSiCb32LRl1RrxA4EPlvW1Uk+PvyPc3RO ZJTri7+t/y7yYzWmtPH4FIViM5/u3ebUhpSOo8Tv90b9WVrzUXnrfAxWga5PihGH9qa9 5IkrrpiyuwPbVjV6DGuHRP8qCTHa+N5AtsY/T3SxlpV5dtWHydQTjnlfEKQLXvnNZwMY tr2ZyGQzHV1rlLifhR31vBtYsAC1+iiI/N1e0fiRJIlOHIhpbfXil3MHkYcmpJfdquqN 6AK3Ras3FXCMByr6RoPccM2aVDzD0lYCw2OHmzG1yNkrlABc0ZjKzPDqls0Sjii0RNNW l/uw== 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 z16-20020a056402275000b0044711ea363esi5441047edd.21.2022.09.22.04.07.39; Thu, 22 Sep 2022 04:08:05 -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 S230073AbiIVKtO (ORCPT + 99 others); Thu, 22 Sep 2022 06:49:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiIVKtL (ORCPT ); Thu, 22 Sep 2022 06:49:11 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D2974CD1E7 for ; Thu, 22 Sep 2022 03:49:09 -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 B8E31ED1; Thu, 22 Sep 2022 03:49:15 -0700 (PDT) Received: from wubuntu (FVFF764EQ05P.cambridge.arm.com [10.1.27.67]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 866793F73B; Thu, 22 Sep 2022 03:49:06 -0700 (PDT) Date: Thu, 22 Sep 2022 11:49:05 +0100 From: Qais Yousef To: Vincent Guittot Cc: Tejun Heo , Dietmar Eggemann , 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, chris.hyser@oracle.com, valentin.schneider@arm.com, patrick.bellasi@matbug.net, David.Laight@aculab.com, pjt@google.com, pavel@ucw.cz, qperret@google.com, tim.c.chen@linux.intel.com, joshdon@google.com Subject: Re: [PATCH v4 6/8] sched/fair: Add sched group latency support Message-ID: <20220922104905.gsif5wtd5w356ghq@wubuntu> References: <20220916080305.29574-1-vincent.guittot@linaro.org> <20220916080305.29574-7-vincent.guittot@linaro.org> <000c2893-feb4-373d-2234-2ca74be94714@arm.com> <20220921155521.qb3jb74nbjoenau6@airbuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, 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 09/22/22 08:40, Vincent Guittot wrote: > On Wed, 21 Sept 2022 at 19:12, Tejun Heo wrote: > > > > On Wed, Sep 21, 2022 at 07:02:57PM +0200, Vincent Guittot wrote: > > > > One option could be just using the same mapping as cpu.weight so that 100 > > > > maps to neutral, 10000 maps close to -20, 1 maps close to 19. It isn't great > > > > that the value can't be interpreted in any intuitive way (e.g. a time > > > > duration based interface would be a lot easier to grok even if it still is > > > > best effort) but if that's what the per-task interface is gonna be, it'd be > > > > best to keep cgroup interface in line. > > > > > > I would prefer a signed range like the [-1000:1000] as the behavior is > > > different for sensitive and non sensitive task unlike the cpu.weight > > > which is reflect that a bigger value get more > > > > How about just sticking with .nice? > > Looks good to me. I will just implement the cpu.latency.nice +1 Keeping both interfaces exposing the same thing would make the most sense IMHO. Though it begs the question, how the per-task and cgroup interface should interact? For example, one of the proposed use cases was to use this knob to control how hard we search for the best cpu in the load balancer (IIRC). If a task sets latency_nice to -19, but it is attached to a cgroup that has cpu.latency.nice to 20. How should the new consumer (load balancer) interpret the effective value for the task? IIUC, current use case doesn't care about effective value as it considers the group and the task as separate entities. But other paths like above wouldn't see this separation and would want to know which of the 2 to consider. We should update Documentation/admin-guide/cgroup-v2.rst with these details for cpu.latency.nice. Thanks! -- Qais Yousef