Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2986486ybc; Mon, 18 Nov 2019 07:47:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyrMPvZdNxtpr0r7UM0G2dAJLKIA+MjtUs2aZPaDZnnIabZUSLjpUwXRObS/JBtcu/0vPga X-Received: by 2002:a17:906:a388:: with SMTP id k8mr26750148ejz.223.1574092058809; Mon, 18 Nov 2019 07:47:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574092058; cv=none; d=google.com; s=arc-20160816; b=fUkI3Gx3kEoj+dl6NOC4HxqYjbMKJALdSXnZBCsBR46i+7iI6gDprS0gSxZIVZHqZj 6wTLqSN+MuIo2EQ22MYKMcKSjm1jYyZP1SV6AP228czIHFYa7aaLOhYnFCm9+Q/bmSAt a2aGQ7z4/Cs6GocuIAzhiYEY+pGxhom30cmjmUl3fFhXoKnn54vn3wqTgci6cm4HH9c/ tH71jNbAbGnI5NYVkuAw8bVjOtm94PZ2zi/Zou7YtmFpBWtq3dOArbDvfI/R2vCjA2Mw uotVc6RCwK30VDAHrYdhhwiSiHpjbxUV/BWNxaH5eZOCl4ZEFAc/ainX9CGlI2hJ45T7 NycA== 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=SYanGlFcgbCcpnW9zQy4D7Hz5LTECpf2PwZ0jTVSeYM=; b=guCPduJI+VBRnp/zob7M8mqb0zGd7XLn79LJOd0W/D+P63Fgugg57gvp9VUp8vihh3 HWPR9b3djtmf8rOldMxh1ik0L6VF8WlPjAYSvdcA1FgCF1msebGP0VT5u/J/mwcDy63r FyhVScEG+1Zr/xxWb2SZpNoNW5WE/moU0EpfgyUlVDQmeDXAWzBpDqBv+S+LvpONwrxO C7lsbcgqxEhX1Lk15KHvzmdnyW0sWHMiFqwTrfbv0FmASzlJnIntXkQPx4tk2xmiNiK/ L+NhQdf2pqOIvLYti93NLnrsneAXcNZS20ZY48YIcdUKIV0jmfiE0wtzHuMdACl1d3Dx JNQA== 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 f18si11336273ejf.210.2019.11.18.07.47.14; Mon, 18 Nov 2019 07:47:38 -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 S1727163AbfKRPnj (ORCPT + 99 others); Mon, 18 Nov 2019 10:43:39 -0500 Received: from foss.arm.com ([217.140.110.172]:36142 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbfKRPnj (ORCPT ); Mon, 18 Nov 2019 10:43:39 -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 E6AC7328; Mon, 18 Nov 2019 07:43:38 -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 8A4503F703; Mon, 18 Nov 2019 07:43:37 -0800 (PST) Date: Mon, 18 Nov 2019 15:43:35 +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: <20191118154334.tolws225robfncp6@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. Apologies if I am being too pushy. But not sure whether this is waiting for its turn in the queue or slipped through the cracks, hence another gentle reminder in case it's the latter :-) Many thanks -- Qais Yousef