Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp107308ybx; Tue, 29 Oct 2019 15:09:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxImLxeM5/2hae199f0drAMze1KXF9FQHKTFwaZMQBYHJSZEhkWrxmo55aEmoIabdFGhER8 X-Received: by 2002:a05:6402:797:: with SMTP id d23mr17589673edy.83.1572386978790; Tue, 29 Oct 2019 15:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572386978; cv=none; d=google.com; s=arc-20160816; b=A9Jo1qs9W5B0ehbifOwvW43hyiBG8Waxu5LHsN8vTa9D8JwNR5fLMhfRWyY7rdXG0A GfP5LP3eQqT1r8wzD0BiDn3I3tViy5rVuundETw2fSNxtDZVmjfE4lbDHvlbnN6wiblM 7CWNuB7/WeGo7cQYuA1jXBDTi68nDlqSN6rL787fEl721fqF4jZfTulhdT5MAZGKJiv0 3jAk2N/TpXXYJ52nHNnzad0sXrbjSn7vkKdL8f9CkreSBeLZSdum5rIjATipGtsZqszo wEus9zZ1smSH+R+rMjWXtJFHTQY/FYY5yu8KlsCJbLbajocQy/WXi5jICQnDPp95UPeu 6I9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6PFHESszmIfaD8AtMndsfeEaNpXA3n0k01l9itcZNwI=; b=Fdf3yLiLNetQYAht7BaoK5SN0y7+M3pFnuGTPO0lLqJ++o4Z5VLmQSphcjCacYZwgj GF5+GhCmbSn4/gDcWemsq7p5Zm0u3sJ6YgxMCejF7ywewIuGdCEFV5HqJKG5/a4b0ODO nl6vu3Luk4hpnHw/OcU6bUOfLGKr1A5WAEBsaYRLqsk2uYE5q6B5OwFuW3nr2cPqKb8n 4nOdHb898HSc4a/+K0aDFLGXAWADGvjSdfdMC/xCV8nswd0SuzknG9AUWlfOjOaygyvU si+NASA8xtntf+J9sk9mV5BHrDsdxHZ92A4BeakFUM+jc4J7yN6fnccqXV52Ou9wseOG H5kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj9si9219293ejb.215.2019.10.29.15.09.14; Tue, 29 Oct 2019 15:09:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbfJ2Ug0 (ORCPT + 99 others); Tue, 29 Oct 2019 16:36:26 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39348 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbfJ2Ug0 (ORCPT ); Tue, 29 Oct 2019 16:36:26 -0400 Received: by mail-wm1-f65.google.com with SMTP id g19so387818wmh.4 for ; Tue, 29 Oct 2019 13:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6PFHESszmIfaD8AtMndsfeEaNpXA3n0k01l9itcZNwI=; b=CdRd7vqNjsRGdCH3xWuo6DSq3XBMGFRQz+pj2NLJeNk8gYbaGOL1POAKVCDXCn7SZa RvVahf5k0BPK0vQ36TzUU+3+PY1HIctr6czmhTiPnmAhNB9Tj9ZFpmEZmLCkY2iJC+Yd psMKEd1UtdB1yREx91mqqafySpOAaGSQlNOLBIB4jhzo/OtGMKicqRKkYI+hvYFBxDZN Md6v8EilRXoW9b+LGOSMhuXIMsUsREb1kxDM1bjmrzvbvp6wlwlW9sUL9hAehXG9LK9e E7eS8ogR11zPqinds0UXNN7RWZS6n43/Bb6uftDe47grdGvJWgr1IzFVzUL2YhFxMZVL XvQw== X-Gm-Message-State: APjAAAVo6cYK1/65vy2TBiolOGwrLspQctAp64rxnEGIEodHa3hYSi0h 1VokxbAmZuGXUE9CveW4Oic= X-Received: by 2002:a1c:410a:: with SMTP id o10mr5796611wma.117.1572381383493; Tue, 29 Oct 2019 13:36:23 -0700 (PDT) Received: from darkstar ([109.70.119.5]) by smtp.gmail.com with ESMTPSA id x12sm4696274wmc.4.2019.10.29.13.36.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Oct 2019 13:36:22 -0700 (PDT) Date: Tue, 29 Oct 2019 20:36:19 +0000 From: Patrick Bellasi To: Vincent Guittot Cc: Qais Yousef , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Juri Lelli , Dietmar Eggemann , Ben Segall , Mel Gorman , linux-kernel Subject: Re: [PATCH v2] sched: rt: Make RT capacity aware Message-ID: <20191029203619.GA7607@darkstar> References: <20191009104611.15363-1-qais.yousef@arm.com> <20191029110224.awoi37pdquachqtd@e107158-lin.cambridge.arm.com> <20191029114824.2kb4fygxxx72r3in@e107158-lin.cambridge.arm.com> <20191029124630.ivfbpenue3fw33qt@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vincent, Qais, On 29-Oct 13:54, Vincent Guittot wrote: > On Tue, 29 Oct 2019 at 13:46, Qais Yousef wrote: > > On 10/29/19 13:20, Vincent Guittot wrote: > > > > > Making big cores the default CPUs for all RT tasks is not a minor > > > > > change and IMO locality should stay the default behavior when there is > > > > > no uclamp constraint The default value for system-wide's uclamp.min is 1024 because by default _we want_ RT tasks running at MAX_OPP. This means that by default RT tasks are running _under constraints_. The "no uclamp constraints" case you mention requires that you set uclamp.min=0 for that task. In that case, this patch will do exactly what you ask for: locality is preserved. > > > > How this is affecting locality? The task will always go to the big core, so it > > > > should be local. > > > > > > local with the waker > > > You will force rt task to run on big cluster although waker, data and > > > interrupts can be on little one. > > > So making big core as default is far from always being the best choice > > > > This is loaded with assumptions IMO. AFAICT we don't know what's the best > > choice. Agree... more on that after... > > First, the value of uclamp.min is outside of the scope of this patch. Unless > > what you're saying is that when uclamp.min is 1024 then we should NOT choose a > > big cpu then there's no disagreement about what this patch do. If that's what > > you're objecting to please be more specific about how do you see this working > > instead. > > My point is that this patch makes the big cores the default CPUs for > RT tasks which is far from being a minor change and far from being > an obvious default good choice Some time ago we agreed that going to MAX_OPP for RT tasks was "mandatory". That was defenitively a big change, likely much more impacting than the one proposed by this patch. On many mobile devices we ended up pinning RT tasks on LITTLE cores (mainly) to save quite a lot of energy by avoiding the case of big CPUs randomly spiking to MAX_OPP just because of a small RT task waking up on them. We also added some heuristic in schedutil has a "band aid" for the effects of the aforementioned choice. By running RT on LITTLEs there could be also some wakeup latency improvement? Yes, maybe... would be interesting to have some real HW *and* SW use-case on hand to compare. However, we know that RT is all about "latency", but what is a bit more fuzzy is the definition of "latency": A) wakeup-latency From a scheduler standpoint it's quite often considered as the the time it takes to "wakeup" a task and actually start executing its instructions. B) completion-time From an app standpoint, it's quite often important the time to complete the task activation and go back to sleep. Running at MAX_OPP looks much more related to the need to complete fast than waking up fast, especially considering that that decision was taken looking mainly (perhaps only) to SMP systems. On heterogeneous systems, "wakeup-latency" and "completion-time" are two metrics which *maybe* can be better served by different cores. However, it's very difficult to argument if one metric is more important than the other. It's even more difficult to quantify it because of the multitide of HW and SW combinations. Thus, what's proposed here can be far from being an "obvious good chooce", but it's also quite difficult to argue and proof that's defenitively _not_ a good choice. It's just a default which: 1) keeps things simple for RT tasks by using the same default policy for both frequency and CPUs selection we always run (when possible) at the highest available capacity 2) it's based on a per-task/system-wide tunable mechanism Is that not enought to justfy it as a default? Best, Patrick -- #include Patrick Bellasi