Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp701631ybx; Thu, 7 Nov 2019 01:16:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyHPsf5htAQQsDzSD9UYZ2EFzzoG13vDtDAFZs/DzVSLkutUKapeTTeLt7vRHqyVgc0lwW8 X-Received: by 2002:a05:6402:213:: with SMTP id t19mr2385355edv.7.1573118174572; Thu, 07 Nov 2019 01:16:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573118174; cv=none; d=google.com; s=arc-20160816; b=OOsW7xooeWeUIHxwbkK12soOhqF/gQPdAuJ1LhkvL5mnT93eNKcArbQAXnklEhrnkC vvBQsQXW1hHw1xC6U5paTRdh78O4zLyNHyT9E2t3+eOwTaAOvJ1Hj/PAfdm1NlumYKm0 gun42nAZi1Nvad0hvkLZdn91n9CkszvHLjZDgNqUtVHmGILVpsiq0ngOKdMlbklqd7/7 x2eVS47Ahc6x8zHDRmFtGbm1MOBi4T2lqqZaWmd9gU6tr7RhgkRWS9ezvVHcFRoaCEAq ZRp516370h0aCh7CXUXtpPD3tJC8lg6P4AwxEc7QeIiF7sGY+ynKobldc6OPrg+RgmBc PLDw== 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=/CfgCPzknif+FxGBoRGuFrTIQGpcc5Uh5jQ0zOeLNxU=; b=XzPZw4Rl+FEsVIQz1c69YgsgXUJxasPp8hhY7wLQW+NO+TG5NC2x3M6pB1XYF1EzW7 E1Nue5Jf67YoRuIG1yGXpA0LDUaGgyvxKTJeugAXQwV8kHk7DsTVfF9+yDJWKKqX5lf+ 9Ua9HK8+K1+E9VCBGbWsghD3xX8ek6RB5d8gciX0SULsujdIhnCDqXZGOJe2getsZyt2 E2AlHVd/FcObCl245skbTZWxPZZ4sZ5J6WruYzuzDEeqaP/HI9UAewXAss6aDnUJObon gEWoBHjNQyGbdqNsr8Y3vz+Wu8dP4xFACFgydP8CAtinea0OcDOF1OANjiruMa4zdnAV kQPA== 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 z15si989199eju.310.2019.11.07.01.15.50; Thu, 07 Nov 2019 01:16:14 -0800 (PST) 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 S1733215AbfKGJPS (ORCPT + 99 others); Thu, 7 Nov 2019 04:15:18 -0500 Received: from foss.arm.com ([217.140.110.172]:52342 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727300AbfKGJPS (ORCPT ); Thu, 7 Nov 2019 04:15:18 -0500 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 16A4046A; Thu, 7 Nov 2019 01:15:17 -0800 (PST) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D043B3F71A; Thu, 7 Nov 2019 01:15:15 -0800 (PST) Date: Thu, 7 Nov 2019 09:15:13 +0000 From: Qais Yousef To: Steven Rostedt Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] sched: rt: Make RT capacity aware Message-ID: <20191107091513.dmat6wxqdeividhq@e107158-lin.cambridge.arm.com> References: <20191009104611.15363-1-qais.yousef@arm.com> <20191028143749.GE4114@hirez.programming.kicks-ass.net> <20191028140147.036a0001@grimm.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191028140147.036a0001@grimm.local.home> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve On 10/28/19 14:01, Steven Rostedt wrote: > On Mon, 28 Oct 2019 15:37:49 +0100 > Peter Zijlstra wrote: > > > On Wed, Oct 09, 2019 at 11:46:11AM +0100, Qais Yousef wrote: > > > Capacity Awareness refers to the fact that on heterogeneous systems > > > (like Arm big.LITTLE), the capacity of the CPUs is not uniform, hence > > > when placing tasks we need to be aware of this difference of CPU > > > capacities. > > > > > > In such scenarios we want to ensure that the selected CPU has enough > > > capacity to meet the requirement of the running task. Enough capacity > > > means here that capacity_orig_of(cpu) >= task.requirement. > > > > > > The definition of task.requirement is dependent on the scheduling class. > > > > > > For CFS, utilization is used to select a CPU that has >= capacity value > > > than the cfs_task.util. > > > > > > capacity_orig_of(cpu) >= cfs_task.util > > > > > > DL isn't capacity aware at the moment but can make use of the bandwidth > > > reservation to implement that in a similar manner CFS uses utilization. > > > The following patchset implements that: > > > > > > https://lore.kernel.org/lkml/20190506044836.2914-1-luca.abeni@santannapisa.it/ > > > > > > capacity_orig_of(cpu)/SCHED_CAPACITY >= dl_deadline/dl_runtime > > > > > > For RT we don't have a per task utilization signal and we lack any > > > information in general about what performance requirement the RT task > > > needs. But with the introduction of uclamp, RT tasks can now control > > > that by setting uclamp_min to guarantee a minimum performance point. > > > > > > ATM the uclamp value are only used for frequency selection; but on > > > heterogeneous systems this is not enough and we need to ensure that the > > > capacity of the CPU is >= uclamp_min. Which is what implemented here. > > > > > > capacity_orig_of(cpu) >= rt_task.uclamp_min > > > > > > Note that by default uclamp.min is 1024, which means that RT tasks will > > > always be biased towards the big CPUs, which make for a better more > > > predictable behavior for the default case. > > > > > > Must stress that the bias acts as a hint rather than a definite > > > placement strategy. For example, if all big cores are busy executing > > > other RT tasks we can't guarantee that a new RT task will be placed > > > there. > > > > > > On non-heterogeneous systems the original behavior of RT should be > > > retained. Similarly if uclamp is not selected in the config. > > > > > > Signed-off-by: Qais Yousef > > > > Works for me; Steve you OK with this? > > Nothing against it, but I want to take a deeper look before we accept > it. Are you OK in waiting a week? I'm currently at Open Source Summit > and still have two more talks to write (giving them Thursday). I wont > have time to look till next week. A gentle reminder if you can spare some time to look at this. It'd be nice if it can make it to the 5.5 merge window if there are no major concerns about it. Thanks! -- Qais Yousef