Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp152675pxr; Sun, 10 Apr 2022 10:06:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJYFr7dewsmpM3XGSN7dQ8gqXZA2ywRP22LvOzrp3aEBxtzxLndFKnm2eM7Op0bAPikViT X-Received: by 2002:a17:907:7f93:b0:6db:7634:f214 with SMTP id qk19-20020a1709077f9300b006db7634f214mr26755898ejc.3.1649610386498; Sun, 10 Apr 2022 10:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649610386; cv=none; d=google.com; s=arc-20160816; b=HeltOQpZSY1BeNEHLAuDndUXWPh0NJD1vl3wP6NfLNKVQbKkMml6WRhGUAldw7veNW kDTkssv5HW7lc5nz1LjUD3d8hQ3feNBXIt3YwBqnnvAk3dtx2yStra9PIC32apImFY5S EMUi56rHjxnLWcTJjrGw0zJwLtWZGft8Vl3Z+5BbYDLte6Ih0PbFEUykCw8e9Eyqi8hp klRQ3qARQGJ8EsAGkWA3chXwqhVHmy3GF1lwi1Oi/8k7QcZ7ufYaeZ96GHBBafEZu2vz pGgVuL0H8p3eneHs7OCuJMQHssvqcsz0Sz4uva/SMMXQfvzwNuA3SaBB78pY2e46+4eq T+gw== 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=OOFGqE/N2JCPBdz0Ygx4IK3PTbp4K3+sHYIe6MY8fEg=; b=GCqKaBaY1eHcnR6kF4sgINpSNhzVOscIIzCOQVvJz2uyCZJX43J270E1HwEkwnLWpg NwyNU4zZhp4bBJXSdA4XDjfwnGICMuCBWM+DbMzUFaIC09hhPg47gPOeBWmra6BfHsFu Kqh6QGjG/SI0RNe/A4n9xs/KEJg6Y0z+mVEbAfj9sT3ibIiRIBlTyTTDO1trwTJ6wakp kyIk9rIPSDQBJLfO/Il89IvO9OWc6uUCdYnWO7WxbFdJ/BKqni9aHELpumNWOHQDU08O QOJNn80iZJ66atqc2zXx/nmJmrLBtV0IrWvVstu2QqAqk/gVutvdlNUqpnqBzjupvFst fATA== 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 d21-20020a170906371500b006e72ea2eae7si5120749ejc.393.2022.04.10.10.06.01; Sun, 10 Apr 2022 10:06:26 -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 S242791AbiDIRKz (ORCPT + 99 others); Sat, 9 Apr 2022 13:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231668AbiDIRKy (ORCPT ); Sat, 9 Apr 2022 13:10:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0CB9EC7D for ; Sat, 9 Apr 2022 10:08:46 -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 11888ED1; Sat, 9 Apr 2022 10:08:46 -0700 (PDT) Received: from wubuntu (unknown [10.57.74.236]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5B5A03F5A1; Sat, 9 Apr 2022 10:08:43 -0700 (PDT) Date: Sat, 9 Apr 2022 18:08:41 +0100 From: Qais Yousef To: Vincent Guittot Cc: Dietmar Eggemann , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org, parth@linux.ibm.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, tj@kernel.org, qperret@google.com, tim.c.chen@linux.intel.com, Wei Wang Subject: Re: [PATCH 0/6] Add latency_nice priority Message-ID: <20220409170841.upcimeak2ch3aj35@wubuntu> References: <20220311161406.23497-1-vincent.guittot@linaro.org> <7a7e1e21-df3d-4623-d9cd-51f5272919d5@arm.com> <20220401121525.flngciwjtkn3mwlv@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_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 On 04/02/22 10:46, Vincent Guittot wrote: > On Fri, 1 Apr 2022 at 14:15, Qais Yousef wrote: > > > > +CC Wei > > > > On 03/28/22 14:56, Vincent Guittot wrote: > > > Hi Dietmar, > > > > > > > > > On Mon, 28 Mar 2022 at 11:24, Dietmar Eggemann wrote: > > > > > > > > On 11/03/2022 17:14, Vincent Guittot wrote: > > > > > This patchset restarts the work about adding a latency nice priority to > > > > > describe the latency tolerance of cfs tasks. > > > > > > > > > > The patches [1-4] have been done by Parth: > > > > > https://lore.kernel.org/lkml/20200228090755.22829-1-parth@linux.ibm.com/ > > > > > > > > > > I have just rebased and moved the set of latency priority outside the > > > > > priority update. I have removed the reviewed tag because the patches > > > > > are 2 years old. > > > > > > > > > > The patches [5-6] use latency nice priority to decide if a cfs task can > > > > > preempt the current running task. Patch 5 gives some tests results with > > > > > cyclictests and hackbench to highlight the benefit of latency nice > > > > > priority for short interactive task or long intensive tasks. > > > > > > > > The Android specific `latency_nice` (in Android `latency_sensitive` > > > > [latency_nice < 0]) use case `Skip energy aware task placement` favors > > > > an idle CPU over the EAS search path for a `latency_sensitive` task. > > > > > > > > https://lkml.kernel.org/r/2aa4b838-c298-ec7d-08f3-caa50cc87dc2@arm.com > > > > > > > > This is Android proprietary code similar to what we have in > > > > find_idlest_group_cpu() in mainline. > > > > We talked to the Android folks last week and IMHO they are not convinced > > > > that they can switch this to the proposed `latency_nice->tweak > > > > preemption` use case. > > > > > > Thanks for discussing this with Android folks. It's not always easy to > > > change the behavior of a product and I would be interested to discuss > > > this with them. Sometimes you need a PoC to get convinced > > > > I think it's good to clarify for me at least here whether you intend this as > > a replacement for disable EAS and revert to CAS or you see this as an > > additional thing? As I understood from the discussion we had on the cover > > letter, this is an additional improvement and not intended to replace any of > > the previous use cases we brought up before. > > This is not a replacement but an additional way to improve latency. > The only thing that could happen is that this feature provides > enhancement that makes the policy of disabling EAS and revert to CAS > becoming less or no more interesting. (Sorry for delayed response, in holiday) Okay thanks for clarifying. One other corner case to consider if you're working on next version is what should happen when there are multiple tasks of the same priority on the rq. RT scheduler will push/pull tasks to ensure the task will get to run ASAP if there's another cpu at lower priority is available. Seems a lot of complexity to add to CFS, but at the same time if 2 important tasks require low latency are on the same rq, one of them will suffer without introducing the ability to migrate one of them where it can get to run sooner. -- Qais Yousef